From 12bfdf1727b3e1153113b1aa22af7b8e02596b34 Mon Sep 17 00:00:00 2001 From: lalyos Date: Mon, 11 Aug 2014 23:36:09 +0200 Subject: [PATCH] Add test case for identical short and long version numbers Signed-off-by: Lajos Papp --- version/version_test.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/version/version_test.go b/version/version_test.go index 27c0536..c02ec40 100644 --- a/version/version_test.go +++ b/version/version_test.go @@ -12,6 +12,8 @@ func assertVersion(t *testing.T, a, b string, result int) { func TestCompareVersion(t *testing.T) { assertVersion(t, "1.12", "1.12", 0) + assertVersion(t, "1.0.0", "1", 0) + assertVersion(t, "1", "1.0.0", 0) assertVersion(t, "1.05.00.0156", "1.0.221.9289", 1) assertVersion(t, "1", "1.0.1", -1) assertVersion(t, "1.0.1", "1", 1)