(t *testing.T)
| 56 | } |
| 57 | |
| 58 | func TestResolve_BothSources(t *testing.T) { |
| 59 | root := t.TempDir() |
| 60 | writeFile(t, root, "src/main.go", "package main\n") |
| 61 | writeFile(t, root, "docs/notes.md", "# Notes\n") |
| 62 | |
| 63 | task := &model.Task{ |
| 64 | ID: "003", |
| 65 | Title: "Both sources", |
| 66 | Touches: []string{"cli"}, |
| 67 | Context: []string{"docs/notes.md"}, |
| 68 | } |
| 69 | scopes := ScopeMap{"cli": {"src/main.go"}} |
| 70 | |
| 71 | result, err := Resolve(task, Options{Scopes: scopes, ProjectRoot: root}) |
| 72 | if err != nil { |
| 73 | t.Fatalf("unexpected error: %v", err) |
| 74 | } |
| 75 | |
| 76 | if len(result.Files) != 2 { |
| 77 | t.Fatalf("expected 2 files, got %d", len(result.Files)) |
| 78 | } |
| 79 | assertFileEntry(t, result.Files[0], "src/main.go", "scope:cli", true) |
| 80 | assertFileEntry(t, result.Files[1], "docs/notes.md", "explicit", true) |
| 81 | } |
| 82 | |
| 83 | func TestResolve_Deduplication(t *testing.T) { |
| 84 | root := t.TempDir() |
nothing calls this directly
no test coverage detected