(t *testing.T)
| 1062 | } |
| 1063 | |
| 1064 | func TestHelpFlagExecuted(t *testing.T) { |
| 1065 | rootCmd := &Command{Use: "root", Long: "Long description", Run: emptyRun} |
| 1066 | |
| 1067 | output, err := executeCommand(rootCmd, "--help") |
| 1068 | if err != nil { |
| 1069 | t.Errorf("Unexpected error: %v", err) |
| 1070 | } |
| 1071 | |
| 1072 | checkStringContains(t, output, rootCmd.Long) |
| 1073 | } |
| 1074 | |
| 1075 | func TestHelpFlagExecutedOnChild(t *testing.T) { |
| 1076 | rootCmd := &Command{Use: "root", Run: emptyRun} |
nothing calls this directly
no test coverage detected