Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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