helpers
(t *testing.T, root, relPath, content string)
| 563 | // helpers |
| 564 | |
| 565 | func 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 | |
| 576 | func assertFileEntry(t *testing.T, f FileEntry, path, source string, exists bool) { |
| 577 | t.Helper() |
no outgoing calls
no test coverage detected