Skip to content

Commit

Permalink
Merge pull request #198 from mattfarina/bug-193
Browse files Browse the repository at this point in the history
Adding tests for cases around Issue 193
  • Loading branch information
mattfarina authored Apr 4, 2023
2 parents 8e6ddaa + bccdecd commit 249ee2d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions version_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ func TestStrictNewVersion(t *testing.T) {
{"1.2.2147483648", false},
{"1.2147483648.3", false},
{"2147483648.3.0", false},

// The SemVer spec in a pre-release expects to allow [0-9A-Za-z-]. But,
// the lack of all 3 parts in this version should produce an error.
{"20221209-update-renovatejson-v4", true},
}

for _, tc := range tests {
Expand Down Expand Up @@ -94,6 +98,9 @@ func TestNewVersion(t *testing.T) {
{"12.3.4.1234", true},
{"12.23.4.1234", true},
{"12.3.34.1234", true},

// The SemVer spec in a pre-release expects to allow [0-9A-Za-z-].
{"20221209-update-renovatejson-v4", false},
}

for _, tc := range tests {
Expand Down

0 comments on commit 249ee2d

Please sign in to comment.