(content string, t *testing.T)
| 46 | } |
| 47 | |
| 48 | func createFileWith(content string, t *testing.T) { |
| 49 | tmpfile, err := os.Create(testWatchFile + ".tmp") |
| 50 | if err != nil { |
| 51 | t.Fatal(err) |
| 52 | } |
| 53 | defer os.Remove(tmpfile.Name()) |
| 54 | |
| 55 | _, err = tmpfile.WriteString(content) |
| 56 | if err != nil { |
| 57 | t.Fatal(err) |
| 58 | } |
| 59 | |
| 60 | err = os.Rename(tmpfile.Name(), testWatchFile) |
| 61 | if err != nil { |
| 62 | t.Fatal(err) |
| 63 | } |
| 64 | } |
| 65 | |
| 66 | func createFile(t *testing.T) { |
| 67 | createFileWith(testWatchFileContent, t) |
no test coverage detected
searching dependent graphs…