Skip to content

Commit

Permalink
make test more general and stable
Browse files Browse the repository at this point in the history
  • Loading branch information
Irioth committed Jun 17, 2020
1 parent 44371a2 commit 1f3e0b5
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions command_test.go
Expand Up @@ -386,11 +386,10 @@ func TestCommand_NoVersionFlagOnCommands(t *testing.T) {
Name: "bar",
Usage: "this is for testing",
Subcommands: []*Command{{}}, // some subcommand
HideHelp: true,
Action: func(c *Context) error {
for _, f := range c.App.VisibleFlags() {
if f == VersionFlag {
t.Fatalf("unexpected version flag")
}
if len(c.App.VisibleFlags()) != 0 {
t.Fatalf("unexpected flag on command")
}
return nil
},
Expand Down

0 comments on commit 1f3e0b5

Please sign in to comment.