(t *testing.T)
| 399 | } |
| 400 | |
| 401 | func TestRootTakesArgs(t *testing.T) { |
| 402 | rootCmd := &Command{Use: "root", Args: ArbitraryArgs, Run: emptyRun} |
| 403 | childCmd := &Command{Use: "child", Run: emptyRun} |
| 404 | rootCmd.AddCommand(childCmd) |
| 405 | |
| 406 | _, err := executeCommand(rootCmd, "legal", "args") |
| 407 | if err != nil { |
| 408 | t.Errorf("Unexpected error: %v", err) |
| 409 | } |
| 410 | } |
| 411 | |
| 412 | func TestChildTakesNoArgs(t *testing.T) { |
| 413 | rootCmd := &Command{Use: "root", Run: emptyRun} |
nothing calls this directly
no test coverage detected