MCPcopy Create free account
hub / github.com/alecthomas/kong / TestDefaultCommandWithSubCommand

Function TestDefaultCommandWithSubCommand

kong_test.go:1450–1458  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

1448}
1449
1450func 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
1460func TestDefaultCommandWithAllowedSubCommand(t *testing.T) {
1461 var cli struct {

Callers

nothing calls this directly

Calls 1

NewFunction · 0.92

Tested by

no test coverage detected