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

Function writeFile

apps/cli/internal/taskcontext/resolve_test.go:565–574  ·  view source on GitHub ↗

helpers

(t *testing.T, root, relPath, content string)

Source from the content-addressed store, hash-verified

563// helpers
564
565func writeFile(t *testing.T, root, relPath, content string) {
566 t.Helper()
567 fullPath := filepath.Join(root, relPath)
568 if err := os.MkdirAll(filepath.Dir(fullPath), 0o755); err != nil {
569 t.Fatalf("mkdir: %v", err)
570 }
571 if err := os.WriteFile(fullPath, []byte(content), 0o644); err != nil {
572 t.Fatalf("write: %v", err)
573 }
574}
575
576func assertFileEntry(t *testing.T, f FileEntry, path, source string, exists bool) {
577 t.Helper()

Calls

no outgoing calls

Tested by

no test coverage detected