(t *testing.T)
| 81 | } |
| 82 | |
| 83 | func TestResolve_Deduplication(t *testing.T) { |
| 84 | root := t.TempDir() |
| 85 | writeFile(t, root, "src/main.go", "package main\n") |
| 86 | |
| 87 | task := &model.Task{ |
| 88 | ID: "004", |
| 89 | Title: "Dedup task", |
| 90 | Touches: []string{"cli"}, |
| 91 | Context: []string{"src/main.go"}, |
| 92 | } |
| 93 | scopes := ScopeMap{"cli": {"src/main.go"}} |
| 94 | |
| 95 | result, err := Resolve(task, Options{Scopes: scopes, ProjectRoot: root}) |
| 96 | if err != nil { |
| 97 | t.Fatalf("unexpected error: %v", err) |
| 98 | } |
| 99 | |
| 100 | if len(result.Files) != 1 { |
| 101 | t.Fatalf("expected 1 file after dedup, got %d", len(result.Files)) |
| 102 | } |
| 103 | // Scope entry comes first, so it wins |
| 104 | assertFileEntry(t, result.Files[0], "src/main.go", "scope:cli", true) |
| 105 | } |
| 106 | |
| 107 | func TestResolve_DirectoryExpansion(t *testing.T) { |
| 108 | root := t.TempDir() |
nothing calls this directly
no test coverage detected