aboutsummaryrefslogtreecommitdiff
path: root/count_test.go
diff options
context:
space:
mode:
authorgonix <[email protected]>2017-10-05 23:42:34 +0300
committerEric Paris <[email protected]>2017-10-05 16:42:34 -0400
commit2c300e72a98b4351617d9b927d2d2860ece8ee24 (patch)
tree0de53385665dfc8fa6bb8ddf49c5facf52d602b9 /count_test.go
parentbe7121dd7a937a85e1e4b1ddda6a3edce3466110 (diff)
Fixing Count flag usage string (#141)
Diffstat (limited to 'count_test.go')
-rw-r--r--count_test.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/count_test.go b/count_test.go
index 460d96a..3785d37 100644
--- a/count_test.go
+++ b/count_test.go
@@ -17,10 +17,14 @@ func TestCount(t *testing.T) {
success bool
expected int
}{
+ {[]string{}, true, 0},
+ {[]string{"-v"}, true, 1},
{[]string{"-vvv"}, true, 3},
{[]string{"-v", "-v", "-v"}, true, 3},
{[]string{"-v", "--verbose", "-v"}, true, 3},
{[]string{"-v=3", "-v"}, true, 4},
+ {[]string{"--verbose=0"}, true, 0},
+ {[]string{"-v=0"}, true, 0},
{[]string{"-v=a"}, false, 0},
}
@@ -45,7 +49,7 @@ func TestCount(t *testing.T) {
t.Errorf("Got error trying to fetch the counter flag")
}
if c != tc.expected {
- t.Errorf("expected %q, got %q", tc.expected, c)
+ t.Errorf("expected %d, got %d", tc.expected, c)
}
}
}