pmbootstrap-meow/test/test_version_validate.py
Oliver Smith f21c216a26
Cosmetic: use SPDX license header (!1877)
While at it, also remove unnecessary "#!/usr/bin/env python3" in files
that only get imported, and adjust other empty/comment lines in the
beginnings of the files for consistency.

This makes files easier to read, and makes the pmbootstrap codebase more
consistent with the build.postmarketos.org codebase.
2020-02-24 03:11:10 +03:00

16 lines
401 B
Python

# Copyright 2020 Oliver Smith
# SPDX-License-Identifier: GPL-3.0-or-later
import pmb_test # noqa
import pmb.parse.version
def test_version_validate():
func = pmb.parse.version.validate
assert func("6.0_1") is False
assert func("6.0_invalidsuffix1") is False
assert func("6.0.0002") is True
assert func("6.0.234") is True
# Issue #1144
assert func("6.0_0002") is False