summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/spf13/pflag/count_test.go
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2018-01-29 14:17:40 -0800
committerGitHub <noreply@github.com>2018-01-29 14:17:40 -0800
commit961c04cae992eadb42d286d2f85f8a675bdc68c8 (patch)
tree3408f2d06f847e966c53485e2d54c692cdd037c1 /vendor/github.com/spf13/pflag/count_test.go
parent8d66523ba7d9a77129844be476732ebfd5272d64 (diff)
downloadchat-961c04cae992eadb42d286d2f85f8a675bdc68c8.tar.gz
chat-961c04cae992eadb42d286d2f85f8a675bdc68c8.tar.bz2
chat-961c04cae992eadb42d286d2f85f8a675bdc68c8.zip
Upgrading server dependancies (#8154)
Diffstat (limited to 'vendor/github.com/spf13/pflag/count_test.go')
-rw-r--r--vendor/github.com/spf13/pflag/count_test.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/vendor/github.com/spf13/pflag/count_test.go b/vendor/github.com/spf13/pflag/count_test.go
index 460d96a6f..3785d375a 100644
--- a/vendor/github.com/spf13/pflag/count_test.go
+++ b/vendor/github.com/spf13/pflag/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)
}
}
}