3 # Of versions worth testing
4 # 1 means that ver1 > ver2
5 # -1 means that ver1 < ver2
6 # 0 means that ver1 = ver2
12 # Important attributes
13 # disabled as dpkg --compare-versions doesn't like them… (versions have to start with a number)
21 # disabled as dpkg --compare-versions doesn't like them… (versions have to start with a number)
22 #III-alpha9.8 III-alpha9.8-1.5 -1
33 # Funky, but allowed, characters in upstream version
34 9:1.18.36:5.4-20 10:0.5.1-22 -1
35 9:1.18.36:5.4-20 9:1.18.36:5.5-1 -1
36 9:1.18.36:5.4-20 9:1.18.37:4.3-22 -1
37 1.18.36-0.17.35-18 1.18.36-19 1
40 1:1.2.13-3 1:1.2.13-3.1 -1
41 2.0.7pre1-4 2.0.7r-1 -1
43 # Test some properties of text strings
50 98.1p5-1 98.1-pre2-b6-2 -1
53 1:3.0.5-2 1:3.0.5.1 -1
58 # #573592 - debian policy 5.6.12
64 # if a version includes a dash
65 # it should be the debrev dash - policy says so…
68 # do we like strange versions? Yes we like strange versions…
72 # "steal" the testcases from cupt
73 1.2.3 1.2.3 0 # identical
74 4.4.3-2 4.4.3-2 0 # identical
75 1:2ab:5 1:2ab:5 0 # this is correct...
76 7:1-a:b-5 7:1-a:b-5 0 # and this
77 57:1.2.3abYZ+~-4-5 57:1.2.3abYZ+~-4-5 0 # and those too
78 1.2.3 0:1.2.3 0 # zero epoch
79 1.2.3 1.2.3-0 0 # zero revision
81 009ab5 9ab5 0 # there as well
82 1.2.3 1.2.3-1 -1 # added non-zero revision
83 1.2.3 1.2.4 -1 # just bigger
84 1.2.4 1.2.3 1 # order doesn't matter
85 1.2.24 1.2.3 1 # bigger, eh?
86 0.10.0 0.8.7 1 # bigger, eh?
87 3.2 2.3 1 # major number rocks
88 1.3.2a 1.3.2 1 # letters rock
89 0.5.0~git 0.5.0~git2 -1 # numbers rock
90 2a 21 -1 # but not in all places
91 1.3.2a 1.3.2b -1 # but there is another letter
92 1:1.2.3 1.2.4 1 # epoch rocks
93 1:1.2.3 1:1.2.4 -1 # bigger anyway
94 1.2a+~bCd3 1.2a++ -1 # tilde doesn't rock
95 1.2a+~bCd3 1.2a+~ 1 # but first is longer!
96 5:2 304-2 1 # epoch rocks
97 5:2 304:2 -1 # so big epoch?
98 25:2 3:2 1 # 25 > 3, obviously
99 1:2:123 1:12:3 -1 # 12 > 2
100 1.2-5 1.2-3-5 -1 # 1.2 < 1.2-3
101 5.10.0 5.005 1 # preceding zeroes don't matters
102 3a9.8 3.10.2 -1 # letters are before all letter symbols
103 3a9.8 3~10 1 # but after the tilde
104 1.4+OOo3.0.0~ 1.4+OOo3.0.0-4 -1 # another tilde check
105 2.4.7-1 2.4.7-z -1 # revision comparing
106 1.002-1+b2 1.00 1 # whatever...