Add regression test for normalizeVersion
Prevents recurrence of the infinite update loop bug fixed in 1b866598
where version prefix mismatch caused continuous self-updates.
This commit is contained in:
parent
ea18aad96c
commit
ac5992b6c6
1 changed files with 9 additions and 0 deletions
|
|
@ -396,3 +396,12 @@ func TestSymlinkResolution(t *testing.T) {
|
|||
}
|
||||
os.Remove(newPath)
|
||||
}
|
||||
|
||||
func TestNormalizeVersion(t *testing.T) {
|
||||
if got := normalizeVersion("v4.33.1"); got != "4.33.1" {
|
||||
t.Errorf("normalizeVersion(%q) = %q, want %q", "v4.33.1", got, "4.33.1")
|
||||
}
|
||||
if got := normalizeVersion("4.33.1"); got != "4.33.1" {
|
||||
t.Errorf("normalizeVersion(%q) = %q, want %q", "4.33.1", got, "4.33.1")
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue