Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
admpub committed Mar 21, 2024
1 parent 06fa35d commit 10d9037
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions compare_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,13 @@ func TestVersionCompare(t *testing.T) {
if VersionCompare(`6.1.0-stable`, `6.1.0-beta1`) != VersionCompareGt {
t.Error(`Error: 6.1.0-stable <= 6.1.0-beta1`)
}
if VersionCompare(`6.1.0.1`, `6.1.0`) != VersionCompareGt {
t.Error(`Error: 6.1.0.1 <= 6.1.0`)
}
if VersionCompare(`6.1.0`, `6.1.0.1`) != VersionCompareLt {
t.Error(`Error: 6.1.0 >= 6.1.0.1`)
}
if VersionCompare(`6.1.0.1`, `6.1.0.2`) != VersionCompareLt {
t.Error(`Error: 6.1.0.1 >= 6.1.0.2`)
}
}

0 comments on commit 10d9037

Please sign in to comment.