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

Function TestCommitMsg_MultiTaskShort

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

Source from the content-addressed store, hash-verified

416}
417
418func 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
440func TestCommitMsg_AutoInferFromDiff(t *testing.T) {
441 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