writeTestFile creates a file in the working directory, with any missing parent directories.
(t *testing.T, path, content string)
| 1753 | // writeTestFile creates a file in the working directory, with any missing |
| 1754 | // parent directories. |
| 1755 | func writeTestFile(t *testing.T, path, content string) { |
| 1756 | t.Helper() |
| 1757 | require.NoError(t, os.MkdirAll(filepath.Dir(path), 0755)) |
| 1758 | require.NoError(t, os.WriteFile(path, []byte(content), 0644)) |
| 1759 | } |
| 1760 | |
| 1761 | // symlinkTestFile creates a symlink, or skips the test where that needs a |
| 1762 | // privilege the system doesn't grant, as on Windows by default. |
no test coverage detected