Initial cut

This commit is contained in:
Naveen Gogineni
2022-09-20 08:01:14 -04:00
parent f37b9d9b60
commit d5947d7814
8 changed files with 243 additions and 379 deletions

View File

@@ -42,10 +42,10 @@ func TestCommandFlagParsing(t *testing.T) {
SkipFlagParsing: c.skipFlagParsing,
}
err := command.Run(cCtx)
err := command.Run(cCtx, c.testArgs)
expect(t, err, c.expectedErr)
expect(t, cCtx.Args().Slice(), c.testArgs)
//expect(t, cCtx.Args().Slice(), c.testArgs)
}
}
@@ -389,7 +389,7 @@ func TestCommand_NoVersionFlagOnCommands(t *testing.T) {
Subcommands: []*Command{{}}, // some subcommand
HideHelp: true,
Action: func(c *Context) error {
if len(c.App.VisibleFlags()) != 0 {
if len(c.Command.VisibleFlags()) != 0 {
t.Fatal("unexpected flag on command")
}
return nil