MCPcopy Create free account
hub / github.com/driangle/taskmd / TestCommitMsg_MultiTask

Function TestCommitMsg_MultiTask

apps/cli/internal/cli/commit_msg_test.go:357–385  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

355}
356
357func 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
387func TestCommitMsg_MultiTaskWithBody(t *testing.T) {
388 tmpDir := createCommitMsgTestFiles(t)

Callers

nothing calls this directly

Calls 4

createCommitMsgTestFilesFunction · 0.85
resetCommitMsgFlagsFunction · 0.85
mockGitDiffAndRootFunction · 0.85
captureCommitMsgOutputFunction · 0.85

Tested by

no test coverage detected