(t *testing.T)
| 222 | } |
| 223 | |
| 224 | func TestCommitMsg_BodyFlag(t *testing.T) { |
| 225 | tmpDir := createCommitMsgTestFiles(t) |
| 226 | resetCommitMsgFlags() |
| 227 | taskDir = tmpDir |
| 228 | commitMsgTaskID = "042" |
| 229 | commitMsgBody = true |
| 230 | |
| 231 | output, err := captureCommitMsgOutput(t) |
| 232 | if err != nil { |
| 233 | t.Fatalf("unexpected error: %v", err) |
| 234 | } |
| 235 | |
| 236 | if !strings.Contains(output, "- Create command scaffolding") { |
| 237 | t.Errorf("expected completed subtask in body, got:\n%s", output) |
| 238 | } |
| 239 | if !strings.Contains(output, "- Implement message generation") { |
| 240 | t.Errorf("expected second completed subtask in body, got:\n%s", output) |
| 241 | } |
| 242 | // Unchecked subtask should NOT be included |
| 243 | if strings.Contains(output, "Add documentation") { |
| 244 | t.Errorf("unchecked subtask should not appear in body, got:\n%s", output) |
| 245 | } |
| 246 | } |
| 247 | |
| 248 | func TestCommitMsg_BodyFlagNoSubtasks(t *testing.T) { |
| 249 | tmpDir := t.TempDir() |
nothing calls this directly
no test coverage detected