(t *testing.T)
| 1114 | } |
| 1115 | |
| 1116 | func TestHelpExecutedOnNonRunnableChild(t *testing.T) { |
| 1117 | rootCmd := &Command{Use: "root", Run: emptyRun} |
| 1118 | childCmd := &Command{Use: "child", Long: "Long description"} |
| 1119 | rootCmd.AddCommand(childCmd) |
| 1120 | |
| 1121 | output, err := executeCommand(rootCmd, "child") |
| 1122 | if err != nil { |
| 1123 | t.Errorf("Unexpected error: %v", err) |
| 1124 | } |
| 1125 | |
| 1126 | checkStringContains(t, output, childCmd.Long) |
| 1127 | } |
| 1128 | |
| 1129 | func TestSetUsageTemplate(t *testing.T) { |
| 1130 | rootCmd := &Command{Use: "root", Run: emptyRun} |
nothing calls this directly
no test coverage detected