(t *testing.T)
| 385 | } |
| 386 | |
| 387 | func TestCommitMsg_MultiTaskWithBody(t *testing.T) { |
| 388 | tmpDir := createCommitMsgTestFiles(t) |
| 389 | resetCommitMsgFlags() |
| 390 | taskDir = tmpDir |
| 391 | commitMsgBody = true |
| 392 | |
| 393 | mockGitDiffAndRoot(t, |
| 394 | "diff --git a/cli/042-feature.md b/cli/042-feature.md\n"+ |
| 395 | "+++ b/cli/042-feature.md\n"+ |
| 396 | "+status: completed\n"+ |
| 397 | "diff --git a/cli/043-bugfix.md b/cli/043-bugfix.md\n"+ |
| 398 | "+++ b/cli/043-bugfix.md\n"+ |
| 399 | "+status: completed\n", |
| 400 | tmpDir) |
| 401 | |
| 402 | output, err := captureCommitMsgOutput(t) |
| 403 | if err != nil { |
| 404 | t.Fatalf("unexpected error: %v", err) |
| 405 | } |
| 406 | |
| 407 | if !strings.Contains(output, "Add commit-msg command:") { |
| 408 | t.Errorf("expected task title section in body, got:\n%s", output) |
| 409 | } |
| 410 | if !strings.Contains(output, "- Create command scaffolding") { |
| 411 | t.Errorf("expected subtask from first task, got:\n%s", output) |
| 412 | } |
| 413 | if !strings.Contains(output, "Fix output formatting:") { |
| 414 | t.Errorf("expected second task title section, got:\n%s", output) |
| 415 | } |
| 416 | } |
| 417 | |
| 418 | func TestCommitMsg_MultiTaskShort(t *testing.T) { |
| 419 | tmpDir := createCommitMsgTestFiles(t) |
nothing calls this directly
no test coverage detected