(t *testing.T)
| 416 | } |
| 417 | |
| 418 | func TestCommitMsg_MultiTaskShort(t *testing.T) { |
| 419 | tmpDir := createCommitMsgTestFiles(t) |
| 420 | resetCommitMsgFlags() |
| 421 | taskDir = tmpDir |
| 422 | commitMsgShort = true |
| 423 | |
| 424 | mockGitDiffAndRoot(t, |
| 425 | "+++ b/cli/042-feature.md\n+status: completed\n"+ |
| 426 | "+++ b/cli/043-bugfix.md\n+status: completed\n", |
| 427 | tmpDir) |
| 428 | |
| 429 | output, err := captureCommitMsgOutput(t) |
| 430 | if err != nil { |
| 431 | t.Fatalf("unexpected error: %v", err) |
| 432 | } |
| 433 | |
| 434 | trimmed := strings.TrimSpace(output) |
| 435 | if strings.Contains(trimmed, "\n") { |
| 436 | t.Errorf("--short should produce single line, got:\n%s", output) |
| 437 | } |
| 438 | } |
| 439 | |
| 440 | func TestCommitMsg_AutoInferFromDiff(t *testing.T) { |
| 441 | tmpDir := createCommitMsgTestFiles(t) |
nothing calls this directly
no test coverage detected