summaryrefslogtreecommitdiff
path: root/test/test_semver_utils.vader
blob: 9730b74b6edf9da4120a1364814126ea7c58b4d1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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])