(t *testing.T)
| 1448 | } |
| 1449 | |
| 1450 | func TestDefaultCommandWithSubCommand(t *testing.T) { |
| 1451 | var cli struct { |
| 1452 | One struct { |
| 1453 | Two struct{} `cmd:""` |
| 1454 | } `cmd:"" default:"1"` |
| 1455 | } |
| 1456 | _, err := kong.New(&cli) |
| 1457 | assert.EqualError(t, err, "<anonymous struct>.One: default command one <command> must not have subcommands or arguments") |
| 1458 | } |
| 1459 | |
| 1460 | func TestDefaultCommandWithAllowedSubCommand(t *testing.T) { |
| 1461 | var cli struct { |