summaryrefslogtreecommitdiff
path: root/test/test_semver_utils.vader
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2019-01-27 10:56:02 +0000
committerw0rp <devw0rp@gmail.com>2019-01-27 10:56:08 +0000
commit3ac12b69399fc1f85e9a8ad2e76dc4e1f938f7d2 (patch)
treecaccc425e69320b30574078075d61e1d6ef88ded /test/test_semver_utils.vader
parentdd995d9aa9ec950fdf307cad39487e29abd5ee49 (diff)
downloadale-3ac12b69399fc1f85e9a8ad2e76dc4e1f938f7d2.zip
Fix #2216 - Tolerate versions without path numbers
Diffstat (limited to 'test/test_semver_utils.vader')
-rw-r--r--test/test_semver_utils.vader4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/test_semver_utils.vader b/test/test_semver_utils.vader
index 30e9e818..cd0381dd 100644
--- a/test/test_semver_utils.vader
+++ b/test/test_semver_utils.vader
@@ -17,6 +17,10 @@ Execute(GetVersion should cache the version):
AssertEqual [3, 4, 7], ale#semver#GetVersion('dummy', ['Version 3.4.7'])
AssertEqual [3, 4, 7], ale#semver#GetVersion('dummy', [])
+Execute(GetVersion should tolerate missing patch numbers):
+ " This goes against the semver spec, but we handle it anyway.
+ AssertEqual [3, 4, 0], ale#semver#GetVersion('dummy', ['Version 3.4'])
+
Execute(HasVersion should return 1 when the version has been cached):
call ale#semver#GetVersion('dummy', [])
AssertEqual 0, ale#semver#HasVersion('dummy')