Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding tests for cases around Issue 193 #198

Merged
merged 1 commit into from
Apr 4, 2023
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