zsh-completion: remove bad test

I thought there was a bug in the boolSlice definition but it seems
It was my mistake in identifying what's going on. Also removed the
provisioning to skip tests (doesn't seem to be needed anymore).
This commit is contained in:
Haim Ashkenazi 2018-03-03 20:34:00 +02:00 committed by Steve Francia
parent 0d9a33d2da
commit 91e80cc4a4

View file

@ -15,7 +15,6 @@ func TestGenZshCompletion(t *testing.T) {
name string
root *Command
expectedExpressions []string
skip string
}{
{
name: "simple command",
@ -112,18 +111,6 @@ func TestGenZshCompletion(t *testing.T) {
`'\(\*-d \*--debug\)'{\\\*-d,\\\*--debug}`,
},
},
{
name: "boolSlice should not accept arguments",
root: func() *Command {
r := genTestCommand("mycmd", true)
r.Flags().BoolSlice("verbose", []bool{}, "verbosity level")
return r
}(),
expectedExpressions: []string{
`'\*--verbose\[verbosity level]'`,
},
skip: "BoolSlice behaves strangely both with NoOptDefVal and type (identifies as bool)",
},
}
for _, tc := range tcs {
@ -135,10 +122,6 @@ func TestGenZshCompletion(t *testing.T) {
}
output := buf.Bytes()
if tc.skip != "" {
t.Skip("Skipping:", tc.skip)
}
for _, expr := range tc.expectedExpressions {
rgx, err := regexp.Compile(expr)
if err != nil {