(t *testing.T)
| 298 | } |
| 299 | |
| 300 | func createStatusTestFilesWithChildren(t *testing.T) string { |
| 301 | t.Helper() |
| 302 | |
| 303 | tmpDir := t.TempDir() |
| 304 | |
| 305 | tasks := map[string]string{ |
| 306 | "010-parent.md": `--- |
| 307 | id: "010" |
| 308 | title: "Parent task" |
| 309 | status: in-progress |
| 310 | tags: [] |
| 311 | dependencies: [] |
| 312 | --- |
| 313 | |
| 314 | # Parent task |
| 315 | `, |
| 316 | "011-child-a.md": `--- |
| 317 | id: "011" |
| 318 | title: "Child A" |
| 319 | status: pending |
| 320 | parent: "010" |
| 321 | tags: [] |
| 322 | dependencies: [] |
| 323 | --- |
| 324 | |
| 325 | # Child A |
| 326 | `, |
| 327 | "012-child-b.md": `--- |
| 328 | id: "012" |
| 329 | title: "Child B" |
| 330 | status: completed |
| 331 | parent: "010" |
| 332 | tags: [] |
| 333 | dependencies: [] |
| 334 | --- |
| 335 | |
| 336 | # Child B |
| 337 | `, |
| 338 | "013-grandchild.md": `--- |
| 339 | id: "013" |
| 340 | title: "Grandchild" |
| 341 | status: pending |
| 342 | parent: "011" |
| 343 | tags: [] |
| 344 | dependencies: [] |
| 345 | --- |
| 346 | |
| 347 | # Grandchild |
| 348 | `, |
| 349 | } |
| 350 | |
| 351 | for filename, content := range tasks { |
| 352 | path := filepath.Join(tmpDir, filename) |
| 353 | if err := os.WriteFile(path, []byte(content), 0644); err != nil { |
| 354 | t.Fatalf("Failed to create test file %s: %v", filename, err) |
| 355 | } |
| 356 | } |
| 357 |
no outgoing calls
no test coverage detected