Fix parsing the third part of version string (#2355)

* Fix parsing the third part of version string
* Add test
* Test: fix checking cached version
This commit is contained in:
Tomasz N
2019-03-12 18:49:48 +01:00
committed by w0rp
parent 365ffae6c4
commit 5f03bae41c
2 changed files with 4 additions and 3 deletions

View File

@@ -15,7 +15,8 @@ Execute(GetVersion should return an empty list when no vesrion can be found):
Execute(GetVersion should cache the version):
AssertEqual [], ale#semver#GetVersion('dummy', [])
AssertEqual [3, 4, 7], ale#semver#GetVersion('dummy', ['Version 3.4.7'])
AssertEqual [3, 4, 7], ale#semver#GetVersion('dummy', [])
AssertEqual [3, 4, 17], ale#semver#GetVersion('dummy', ['Version 3.4.17'])
AssertEqual [3, 4, 17], ale#semver#GetVersion('dummy', [])
Execute(GetVersion should tolerate missing patch numbers):
" This goes against the semver spec, but we handle it anyway.