(t *testing.T)
| 380 | } |
| 381 | |
| 382 | func TestWatchBothDirAndFile(t *testing.T) { |
| 383 | f := newNotifyFixture(t) |
| 384 | |
| 385 | dir := f.JoinPath("foo") |
| 386 | fileA := f.JoinPath("foo", "a") |
| 387 | fileB := f.JoinPath("foo", "b") |
| 388 | f.WriteFile(fileA, "a") |
| 389 | f.WriteFile(fileB, "b") |
| 390 | |
| 391 | f.watch(fileA) |
| 392 | f.watch(dir) |
| 393 | f.fsync() |
| 394 | f.events = nil |
| 395 | |
| 396 | f.WriteFile(fileB, "b-new") |
| 397 | f.assertEvents(fileB) |
| 398 | } |
| 399 | |
| 400 | func TestWatchNonexistentFileInNonexistentDirectoryCreatedSimultaneously(t *testing.T) { |
| 401 | f := newNotifyFixture(t) |
nothing calls this directly
no test coverage detected