(t *testing.T)
| 155 | } |
| 156 | |
| 157 | func TestContext_TouchesOnly(t *testing.T) { |
| 158 | tmpDir := createContextTestFiles(t) |
| 159 | resetContextFlags() |
| 160 | taskDir = tmpDir |
| 161 | |
| 162 | // Override config path to use tmpDir's .taskmd.yaml |
| 163 | setupTestConfig(t, tmpDir) |
| 164 | |
| 165 | ctxTaskID = "001" |
| 166 | output, err := captureContextOutput(t) |
| 167 | if err != nil { |
| 168 | t.Fatalf("unexpected error: %v", err) |
| 169 | } |
| 170 | |
| 171 | if !strings.Contains(output, "Context for task") { |
| 172 | t.Errorf("expected header, got: %s", output) |
| 173 | } |
| 174 | if !strings.Contains(output, "src/main.go") { |
| 175 | t.Errorf("expected src/main.go in output, got: %s", output) |
| 176 | } |
| 177 | if !strings.Contains(output, "src/util.go") { |
| 178 | t.Errorf("expected src/util.go in output, got: %s", output) |
| 179 | } |
| 180 | } |
| 181 | |
| 182 | func TestContext_ExplicitOnly(t *testing.T) { |
| 183 | tmpDir := createContextTestFiles(t) |
nothing calls this directly
no test coverage detected