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:
Alex Chan
2026-06-24 16:49:25 +01:00
committed by Alex Chan
parent dd1df38200
commit 9f92a4728e

View File

@@ -91,6 +91,12 @@ func TestCompare(t *testing.T) {
v2: "0.96-105",
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
// of strconv.ParseUint with these characters would have lead us to