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

Function TestContext_MaxFiles

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

Source from the content-addressed store, hash-verified

430}
431
432func TestContext_MaxFiles(t *testing.T) {
433 tmpDir := createContextTestFiles(t)
434 resetContextFlags()
435 taskDir = tmpDir
436 setupTestConfig(t, tmpDir)
437
438 ctxTaskID = "003"
439 ctxFormat = "json"
440 ctxMaxFiles = 1
441 output, err := captureContextOutput(t)
442 if err != nil {
443 t.Fatalf("unexpected error: %v", err)
444 }
445
446 var result taskcontext.Result
447 if err := json.Unmarshal([]byte(output), &result); err != nil {
448 t.Fatalf("failed to parse JSON: %v", err)
449 }
450
451 if len(result.Files) != 1 {
452 t.Errorf("expected 1 file (capped), got %d", len(result.Files))
453 }
454}
455
456func TestContext_InvalidFormat(t *testing.T) {
457 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