(t *testing.T)
| 427 | } |
| 428 | |
| 429 | func TestChildTakesArgs(t *testing.T) { |
| 430 | rootCmd := &Command{Use: "root", Run: emptyRun} |
| 431 | childCmd := &Command{Use: "child", Args: ArbitraryArgs, Run: emptyRun} |
| 432 | rootCmd.AddCommand(childCmd) |
| 433 | |
| 434 | _, err := executeCommand(rootCmd, "child", "legal", "args") |
| 435 | if err != nil { |
| 436 | t.Fatalf("Unexpected error: %v", err) |
| 437 | } |
| 438 | } |
| 439 | |
| 440 | func TestMatchAll(t *testing.T) { |
| 441 | // Somewhat contrived example check that ensures there are exactly 3 |
nothing calls this directly
no test coverage detected