Skip to content

Commit 249ee2d

Browse files
authored
Merge pull request #198 from mattfarina/bug-193
Adding tests for cases around Issue 193
2 parents 8e6ddaa + bccdecd commit 249ee2d

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

version_test.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ func TestStrictNewVersion(t *testing.T) {
4141
{"1.2.2147483648", false},
4242
{"1.2147483648.3", false},
4343
{"2147483648.3.0", false},
44+
45+
// The SemVer spec in a pre-release expects to allow [0-9A-Za-z-]. But,
46+
// the lack of all 3 parts in this version should produce an error.
47+
{"20221209-update-renovatejson-v4", true},
4448
}
4549

4650
for _, tc := range tests {
@@ -94,6 +98,9 @@ func TestNewVersion(t *testing.T) {
9498
{"12.3.4.1234", true},
9599
{"12.23.4.1234", true},
96100
{"12.3.34.1234", true},
101+
102+
// The SemVer spec in a pre-release expects to allow [0-9A-Za-z-].
103+
{"20221209-update-renovatejson-v4", false},
97104
}
98105

99106
for _, tc := range tests {

0 commit comments

Comments
 (0)