(t *testing.T)
| 274 | } |
| 275 | |
| 276 | func TestSingleFile(t *testing.T) { |
| 277 | f := newNotifyFixture(t) |
| 278 | |
| 279 | root := f.TempDir("root") |
| 280 | path := filepath.Join(root, "change") |
| 281 | |
| 282 | d1 := "hello\ngo\n" |
| 283 | f.WriteFile(path, d1) |
| 284 | |
| 285 | f.watch(path) |
| 286 | f.fsync() |
| 287 | |
| 288 | d2 := []byte("hello\nworld\n") |
| 289 | err := os.WriteFile(path, d2, 0o644) |
| 290 | if err != nil { |
| 291 | t.Fatal(err) |
| 292 | } |
| 293 | f.assertEvents(path) |
| 294 | } |
| 295 | |
| 296 | func TestWriteBrokenLink(t *testing.T) { |
| 297 | if runtime.GOOS == "windows" { |
nothing calls this directly
no test coverage detected