(t *testing.T, path, filename, content string)
| 2228 | } |
| 2229 | |
| 2230 | func createExecutableFileInPath(t *testing.T, path, filename, content string) (pathToFile string) { |
| 2231 | ensureDirectoryExists(t, path) |
| 2232 | |
| 2233 | pathToFile = path + "/" + filename |
| 2234 | contentAsBytes := []byte(content) |
| 2235 | err := os.WriteFile(pathToFile, contentAsBytes, 0755) |
| 2236 | if err != nil { |
| 2237 | failWithFailure(t, "creating file "+filename+" with content "+content, "error") |
| 2238 | } |
| 2239 | return |
| 2240 | } |
| 2241 | |
| 2242 | func createDirectory(t *testing.T, directory string) (pathToDirectory string) { |
| 2243 | return ensureDirectoryExists(t, workingDir+"/"+directory) |
no test coverage detected