(t *testing.T)
| 1104 | } |
| 1105 | |
| 1106 | func TestFlagsInUsage(t *testing.T) { |
| 1107 | rootCmd := &Command{Use: "root", Args: NoArgs, Run: func(*Command, []string) {}} |
| 1108 | output, err := executeCommand(rootCmd, "--help") |
| 1109 | if err != nil { |
| 1110 | t.Errorf("Unexpected error: %v", err) |
| 1111 | } |
| 1112 | |
| 1113 | checkStringContains(t, output, "[flags]") |
| 1114 | } |
| 1115 | |
| 1116 | func TestHelpExecutedOnNonRunnableChild(t *testing.T) { |
| 1117 | rootCmd := &Command{Use: "root", Run: emptyRun} |
nothing calls this directly
no test coverage detected