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

Function TestInputResolver_ReadAll

apps/cli/internal/cli/input_test.go:67–87  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

65}
66
67func TestInputResolver_ReadAll(t *testing.T) {
68 // Create a temporary file
69 tmpDir := t.TempDir()
70 testFile := filepath.Join(tmpDir, "test.md")
71 testContent := []byte("# Test Content\nLine 2\n")
72
73 if err := os.WriteFile(testFile, testContent, 0644); err != nil {
74 t.Fatalf("Failed to create test file: %v", err)
75 }
76
77 resolver := NewInputResolver(false, false)
78 content, err := resolver.ReadAll([]string{testFile})
79
80 if err != nil {
81 t.Fatalf("ReadAll() error = %v", err)
82 }
83
84 if string(content) != string(testContent) {
85 t.Errorf("ReadAll() got %q, want %q", string(content), string(testContent))
86 }
87}

Callers

nothing calls this directly

Calls 2

ReadAllMethod · 0.95
NewInputResolverFunction · 0.85

Tested by

no test coverage detected