(t *testing.T)
| 333 | } |
| 334 | |
| 335 | func TestAdd_DependsOnParsing(t *testing.T) { |
| 336 | tmpDir := t.TempDir() |
| 337 | resetAddFlags() |
| 338 | taskDir = tmpDir |
| 339 | addDependsOn = "001, 002, 003" |
| 340 | |
| 341 | _, err := captureAddOutput(t, "Dependent task") |
| 342 | if err != nil { |
| 343 | t.Fatalf("unexpected error: %v", err) |
| 344 | } |
| 345 | |
| 346 | files, _ := filepath.Glob(filepath.Join(tmpDir, "001-*.md")) |
| 347 | if len(files) != 1 { |
| 348 | t.Fatalf("expected 1 file, got %d", len(files)) |
| 349 | } |
| 350 | |
| 351 | content, _ := os.ReadFile(files[0]) |
| 352 | if !strings.Contains(string(content), `dependencies: ["001", "002", "003"]`) { |
| 353 | t.Errorf("expected dependencies list, got:\n%s", string(content)) |
| 354 | } |
| 355 | } |
| 356 | |
| 357 | func TestAdd_TagsParsing(t *testing.T) { |
| 358 | tmpDir := t.TempDir() |
nothing calls this directly
no test coverage detected