add subcommand
This commit is contained in:
parent
cc1cf8c459
commit
300288670f
12
app_test.go
12
app_test.go
@ -962,6 +962,18 @@ func TestRequiredFlagAppRunBehavior(t *testing.T) {
|
||||
// setup - app
|
||||
app := NewApp()
|
||||
app.Flags = test.flags
|
||||
app.Commands = []Command{
|
||||
Command{
|
||||
Name: "command",
|
||||
Flags: test.flags,
|
||||
Subcommands: []Command{
|
||||
Command{
|
||||
Name: "subcommand",
|
||||
Flags: test.flags,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
// logic under test
|
||||
err := app.Run(test.appRunInput)
|
||||
|
Loading…
Reference in New Issue
Block a user