diff options
Diffstat (limited to 'tests/standard-version/testscript')
-rw-r--r-- | tests/standard-version/testscript | 50 |
1 files changed, 38 insertions, 12 deletions
diff --git a/tests/standard-version/testscript b/tests/standard-version/testscript index 9c80ddb..e5e3248 100644 --- a/tests/standard-version/testscript +++ b/tests/standard-version/testscript @@ -30,6 +30,12 @@ 1.2.3-a.0.456 1.2.3-a.1.456.340c0a26a5ef EOF + + : earliest + : + $* <<EOF >>EOF + 1.2.3- + EOF } : revision @@ -76,11 +82,7 @@ : $* <'1~0.0.0' 2>'0.0.0 version' == 1 - : a-b-expected1 - : - $* <'1.2.3-' 2>"'a' or 'b' expected in pre-release" == 1 - - : a-b-expected2 + : a-b-expected : $* <'1.2.3-k' 2>"'a' or 'b' expected in pre-release" == 1 @@ -122,6 +124,10 @@ : snapshot-id : $* <'1.2.3-a.0.1.83jdgsf+0' 2>'invalid revision' == 1 + + : earliest-prerelease + : + $* <'1.2.3-+1' 2>"'a' or 'b' expected in pre-release" == 1 } : trailing-junk-after @@ -146,6 +152,7 @@ $* '1.2.3-b.1' >n: beta $* '1.2.3-a.1' >y: final $* '1.2.3-a.0.1' >y: snapshot + $* '1.2.3-' >y: earliest } : beta @@ -157,6 +164,7 @@ $* '1.2.3-a.1' >n: alpha $* '1.2.3-b.1' >y: final $* '1.2.3-b.0.1' >y: snapshot + $* '1.2.3-' >n: earliest } : compare @@ -182,10 +190,16 @@ : { $* '1.2.3-a.1' '1.2.3-a.1' >'0' : equal - $* '1.2.3' '1.2.3-a.1' >'1' : release-gt-prereleas + $* '1.2.3' '1.2.3-a.1' >'1' : release-gt-prerelease $* '1.2.3-a.2' '1.2.3-b.1' >'-1' : a-lt-b $* '1.2.3-a.1' '1.2.3-a.1.2' >'-1' : final-lt-snapshot $* '1.2.3-a.1.2.xy' '1.2.3-a.1.2' >'0' : ignore-snapshot-id + $* '1.2.3' '1.2.3-a.0.1' >'1' : release-gt-snapshot + $* '1.2.3-a.0.1' '1.2.3-a.1' >'-1' : snapshot-lt-final + $* '1.2.3' '1.2.3-' >'1' : release-gt-earliest + $* '1.2.3-a.1' '1.2.3-' >'1' : final-gt-earliest + $* '1.2.3-a.0.1' '1.2.3-' >'1' : snapshot-gt-earliest + $* '1.2.2-b.499.z' '1.2.3-' >'-1' : prev-max-snapshot-lt-earliest } } @@ -202,11 +216,11 @@ $* <<EOI >>EOE [1.2.3 1.2.4] (1.2.3 1.2.4) - [ 1.2.3 1.2.4 ] + [ 1.2.3- 1.2.4- ] EOI [1.2.3 1.2.4] (1.2.3 1.2.4) - [1.2.3 1.2.4] + [1.2.3- 1.2.4-] EOE : invalid @@ -234,6 +248,10 @@ : open-end : $* <'[1.2.3 1.2.3)' 2>'equal version endpoints not closed' == 1 + + : earliest-prerelease + : + $* <'[1.2.3- 1.2.3-]' 2>'equal version endpoints are earliest' == 1 } } @@ -248,16 +266,20 @@ <= 1.2.3 > 1.2.3 < 1.2.3 - <=1.2.3 - <1.2.3 + >=1.2.3- + <=1.2.3- + >1.2.3- + <1.2.3- EOI == 1.2.3 >= 1.2.3 <= 1.2.3 > 1.2.3 < 1.2.3 - <= 1.2.3 - < 1.2.3 + >= 1.2.3- + <= 1.2.3- + > 1.2.3- + < 1.2.3- EOE : invalid @@ -265,6 +287,10 @@ { $* <'>=' 2>'no version' == 1 : no-version + : eq-earliest + : + $* <'==1.2.3-' 2>"invalid version: 'a' or 'b' expected in pre-release" == 1 + : junk : $* <'>= 1.2.3-a.1.1.ads@' 2>'invalid version: junk after version' == 1 |