util/cmpver: add a test for comparing three-digit versions
No code changes needed; this is to rule out cmpver as the source of any version-comparison issues. Updates #20238 Change-Id: Ib8765dd042e994549d9e2c03859a5f769a856704 Signed-off-by: Alex Chan <alexc@tailscale.com>
This commit is contained in:
@@ -91,6 +91,12 @@ func TestCompare(t *testing.T) {
|
|||||||
v2: "0.96-105",
|
v2: "0.96-105",
|
||||||
want: 1,
|
want: 1,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "tailscale-three-digits",
|
||||||
|
v1: "1.100.2",
|
||||||
|
v2: "1.55.0",
|
||||||
|
want: 1,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
// Though ۱ and ۲ both satisfy unicode.IsNumber, our previous use
|
// Though ۱ and ۲ both satisfy unicode.IsNumber, our previous use
|
||||||
// of strconv.ParseUint with these characters would have lead us to
|
// of strconv.ParseUint with these characters would have lead us to
|
||||||
|
|||||||
Reference in New Issue
Block a user