(t *testing.T)
| 355 | } |
| 356 | |
| 357 | func TestCommitMsg_MultiTask(t *testing.T) { |
| 358 | tmpDir := createCommitMsgTestFiles(t) |
| 359 | resetCommitMsgFlags() |
| 360 | taskDir = tmpDir |
| 361 | |
| 362 | mockGitDiffAndRoot(t, |
| 363 | "diff --git a/cli/042-feature.md b/cli/042-feature.md\n"+ |
| 364 | "--- a/cli/042-feature.md\n"+ |
| 365 | "+++ b/cli/042-feature.md\n"+ |
| 366 | "@@ -4 +4 @@\n"+ |
| 367 | "-status: pending\n"+ |
| 368 | "+status: completed\n"+ |
| 369 | "diff --git a/cli/043-bugfix.md b/cli/043-bugfix.md\n"+ |
| 370 | "--- a/cli/043-bugfix.md\n"+ |
| 371 | "+++ b/cli/043-bugfix.md\n"+ |
| 372 | "@@ -4 +4 @@\n"+ |
| 373 | "-status: pending\n"+ |
| 374 | "+status: completed\n", |
| 375 | tmpDir) |
| 376 | |
| 377 | output, err := captureCommitMsgOutput(t) |
| 378 | if err != nil { |
| 379 | t.Fatalf("unexpected error: %v", err) |
| 380 | } |
| 381 | |
| 382 | if !strings.Contains(output, "chore: complete tasks 042, 043") { |
| 383 | t.Errorf("expected multi-task subject, got:\n%s", output) |
| 384 | } |
| 385 | } |
| 386 | |
| 387 | func TestCommitMsg_MultiTaskWithBody(t *testing.T) { |
| 388 | tmpDir := createCommitMsgTestFiles(t) |
nothing calls this directly
no test coverage detected