mirror of
https://github.com/spf13/cobra
synced 2024-12-28 07:17:06 +00:00
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:
parent
0d9a33d2da
commit
91e80cc4a4
1 changed files with 0 additions and 17 deletions
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue