Initial 'v' in versions should not be compared on (fixes #980)

This commit is contained in:
Jakob Borg
2014-11-17 18:49:51 +04:00
parent f66c7dc09c
commit 70d8903d3c
2 changed files with 8 additions and 0 deletions

View File

@@ -42,6 +42,10 @@ var testcases = []struct {
{"1.0.0+45", "1.0.0+23-dev-foo", 0},
{"1.0.0-beta.23+45", "1.0.0-beta.23+23-dev-foo", 0},
{"1.0.0-beta.3+99", "1.0.0-beta.24+0", -1},
{"v1.1.2", "1.1.2", 0},
{"v1.1.2", "V1.1.2", 0},
{"1.1.2", "V1.1.2", 0},
}
func TestCompareVersions(t *testing.T) {