summaryrefslogtreecommitdiff
path: root/test/test_semver_utils.vader
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2017-02-06 11:12:21 +0000
committerw0rp <devw0rp@gmail.com>2017-02-06 11:12:27 +0000
commita3b7056cadb045906141cc342404950b6d673959 (patch)
tree0e37604b36c6f1ad5085b1e51fb6c220db39e4e3 /test/test_semver_utils.vader
parenta9a76241ac12901f3f48ab80a6552204c5d01159 (diff)
downloadale-a3b7056cadb045906141cc342404950b6d673959.zip
#289 Only use the --stdin-display-name flag if the flake8 version supports it
Diffstat (limited to 'test/test_semver_utils.vader')
-rw-r--r--test/test_semver_utils.vader16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/test_semver_utils.vader b/test/test_semver_utils.vader
new file mode 100644
index 00000000..9730b74b
--- /dev/null
+++ b/test/test_semver_utils.vader
@@ -0,0 +1,16 @@
+Execute(ParseSemver should return the correct results):
+ " We should be able to parse the semver string from flake8
+ AssertEqual [3, 0, 4], ale#semver#Parse('3.0.4 (mccabe: 0.5.2, pyflakes: 1.2.3, pycodestyle: 2.0.0) CPython 2.7.12 on Linux')
+
+Execute(GreaterOrEqual should compare triples correctly):
+ Assert ale#semver#GreaterOrEqual([3, 0, 4], [3, 0, 0])
+ Assert ale#semver#GreaterOrEqual([3, 0, 0], [3, 0, 0])
+ Assert ale#semver#GreaterOrEqual([3, 0, 0], [2, 0, 0])
+ Assert ale#semver#GreaterOrEqual([3, 1, 0], [3, 1, 0])
+ Assert ale#semver#GreaterOrEqual([3, 2, 0], [3, 1, 0])
+ Assert ale#semver#GreaterOrEqual([3, 2, 2], [3, 1, 6])
+ Assert ale#semver#GreaterOrEqual([3, 2, 5], [3, 2, 5])
+ Assert ale#semver#GreaterOrEqual([3, 2, 6], [3, 2, 5])
+ Assert !ale#semver#GreaterOrEqual([2, 9, 1], [3, 0, 0])
+ Assert !ale#semver#GreaterOrEqual([3, 2, 3], [3, 3, 3])
+ Assert !ale#semver#GreaterOrEqual([3, 3, 2], [3, 3, 3])