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

Function TestContext_IncludeContentText

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

Source from the content-addressed store, hash-verified

367}
368
369func TestContext_IncludeContentText(t *testing.T) {
370 tmpDir := createContextTestFiles(t)
371 resetContextFlags()
372 taskDir = tmpDir
373 setupTestConfig(t, tmpDir)
374
375 ctxTaskID = "002"
376 ctxIncludeContent = true
377 // default format is text
378 output, err := captureContextOutput(t)
379 if err != nil {
380 t.Fatalf("unexpected error: %v", err)
381 }
382
383 // Task body should appear
384 if !strings.Contains(output, "Some body text here.") {
385 t.Errorf("expected task body in text output, got: %s", output)
386 }
387
388 // File content should appear
389 if !strings.Contains(output, "# README") {
390 t.Errorf("expected file content (# README) in text output, got: %s", output)
391 }
392
393 // Line count should appear
394 if !strings.Contains(output, "lines") {
395 t.Errorf("expected line count in text output, got: %s", output)
396 }
397}
398
399func TestContext_IncludeDeps(t *testing.T) {
400 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