Skip to content

Commit

Permalink
Merge pull request #413 from openziti/invalid-versions
Browse files Browse the repository at this point in the history
ensure invalid versions are still invalid
  • Loading branch information
qrkourier authored Aug 8, 2024
2 parents 0cac46d + fa6a18d commit 933e7e1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions versions/versions_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,4 +139,11 @@ func Test_Compare(t *testing.T) {

versionInfo = &VersionInfo{Version: "v0.0.0"}
req.True(versionInfo.HasMinimumVersion("0.18.5"))

// ensure invalid versions are still invalid
_, err = ParseSemVer("2.0.0~alpha1")
req.EqualError(err, `strconv.ParseInt: parsing "0~alpha1": invalid syntax`)

_, err = ParseSemVer("2.0.0-rc2")
req.EqualError(err, `strconv.ParseInt: parsing "0-rc2": invalid syntax`)
}

0 comments on commit 933e7e1

Please sign in to comment.