aboutsummaryrefslogtreecommitdiff
path: root/tests/standard-version/testscript
blob: 4ee17cc149b883b6c6871151454f905f78036bda (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# file      : tests/standard-version/testscript
# license   : MIT; see accompanying LICENSE file

: invalid-arguments
:
{
  $* --is-snapshot 2>'error: missing version'                  == 3 : no-ver
  $* '1.2.3' '1.0' 2>"error: unexpected argument '1.0'"        == 3 : unexpected
  $* '1.2'         2>"error: '.' expected after minor version" == 2 : no-minor
}

$* --is-snapshot     '1.2.3-a.1.12345.abcdef' == 0 : snapshot-yes
$* --is-snapshot     '1.2.3-a.1'              == 1 : snapshot-no
$* --is-not-snapshot '1.2.3-a.1'              == 0 : not-snapshot-yes
$* --is-not-snapshot '1.2.3-a.1.12345.abcdef' == 1 : not-snapshot-no
$* --is-version      'abc'                    == 2 : version-no

$* --is-not-final --is-alpha      '1.2.3-a.1.12345.abcdef' == 0 : not-final-alpha
$* --is-beta --is-latest-snapshot '1.2.3-b.1.z'            == 0 : beta-latest-snapshot
$* --is-not-beta --is-beta        '1.2.3-b.1.z'            == 1 : opposite