|
|
|
@ -1567,7 +1567,8 @@ func TestApp_Run_CommandSubcommandHelpName(t *testing.T) {
|
|
|
|
|
}
|
|
|
|
|
cmd := &Command{
|
|
|
|
|
Name: "foo",
|
|
|
|
|
Description: "foo commands",
|
|
|
|
|
Usage: "foo commands",
|
|
|
|
|
Description: "This is a description",
|
|
|
|
|
Subcommands: []*Command{subCmd},
|
|
|
|
|
}
|
|
|
|
|
app.Commands = []*Command{cmd}
|
|
|
|
@ -1584,6 +1585,11 @@ func TestApp_Run_CommandSubcommandHelpName(t *testing.T) {
|
|
|
|
|
t.Errorf("expected %q in output: %q", expected, output)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
expected = "DESCRIPTION:\n This is a description\n"
|
|
|
|
|
if !strings.Contains(output, expected) {
|
|
|
|
|
t.Errorf("expected %q in output: %q", expected, output)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
expected = "base foo command [command options] [arguments...]"
|
|
|
|
|
if !strings.Contains(output, expected) {
|
|
|
|
|
t.Errorf("expected %q in output: %q", expected, output)
|
|
|
|
|