(t *testing.T)
| 304 | } |
| 305 | |
| 306 | func TestCommitMsg_ShortWithBody(t *testing.T) { |
| 307 | tmpDir := createCommitMsgTestFiles(t) |
| 308 | resetCommitMsgFlags() |
| 309 | taskDir = tmpDir |
| 310 | commitMsgTaskID = "042" |
| 311 | commitMsgShort = true |
| 312 | commitMsgBody = true |
| 313 | |
| 314 | output, err := captureCommitMsgOutput(t) |
| 315 | if err != nil { |
| 316 | t.Fatalf("unexpected error: %v", err) |
| 317 | } |
| 318 | |
| 319 | // --short should override --body: single line only |
| 320 | trimmed := strings.TrimSpace(output) |
| 321 | if strings.Contains(trimmed, "\n") { |
| 322 | t.Errorf("--short should suppress body even when --body is set, got:\n%s", output) |
| 323 | } |
| 324 | } |
| 325 | |
| 326 | func TestCommitMsg_NoGroupScope(t *testing.T) { |
| 327 | tmpDir := createCommitMsgTestFiles(t) |
nothing calls this directly
no test coverage detected