MCPcopy Create free account
hub / github.com/driangle/taskmd / TestContext_TouchesOnly

Function TestContext_TouchesOnly

apps/cli/internal/cli/context_test.go:157–180  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

155}
156
157func 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
182func TestContext_ExplicitOnly(t *testing.T) {
183 tmpDir := createContextTestFiles(t)

Callers

nothing calls this directly

Calls 4

createContextTestFilesFunction · 0.85
resetContextFlagsFunction · 0.85
setupTestConfigFunction · 0.85
captureContextOutputFunction · 0.85

Tested by

no test coverage detected