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

Function TestCommitMsg_ShortWithBody

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

Source from the content-addressed store, hash-verified

304}
305
306func TestCommitMsg_ShortWithBody(t *testing.T) {
307 tmpDir := createCommitMsgTestFiles(t)
308 resetCommitMsgFlags()
309 taskDir = tmpDir
310 commitMsgTaskID = "042"
311 commitMsgShort = true
312 commitMsgBody = true
313
314 output, err := captureCommitMsgOutput(t)
315 if err != nil {
316 t.Fatalf("unexpected error: %v", err)
317 }
318
319 // --short should override --body: single line only
320 trimmed := strings.TrimSpace(output)
321 if strings.Contains(trimmed, "\n") {
322 t.Errorf("--short should suppress body even when --body is set, got:\n%s", output)
323 }
324}
325
326func TestCommitMsg_NoGroupScope(t *testing.T) {
327 tmpDir := createCommitMsgTestFiles(t)

Callers

nothing calls this directly

Calls 3

createCommitMsgTestFilesFunction · 0.85
resetCommitMsgFlagsFunction · 0.85
captureCommitMsgOutputFunction · 0.85

Tested by

no test coverage detected