(t *testing.T)
| 444 | } |
| 445 | |
| 446 | func TestWatchNonexistentFileInNonexistentDirectory(t *testing.T) { |
| 447 | f := newNotifyFixture(t) |
| 448 | |
| 449 | root := f.JoinPath("root") |
| 450 | err := os.Mkdir(root, 0o777) |
| 451 | if err != nil { |
| 452 | t.Fatal(err) |
| 453 | } |
| 454 | parent := f.JoinPath("parent") |
| 455 | file := f.JoinPath("parent", "a") |
| 456 | |
| 457 | f.watch(file) |
| 458 | f.assertEvents() |
| 459 | |
| 460 | err = os.Mkdir(parent, 0o777) |
| 461 | if err != nil { |
| 462 | t.Fatal(err) |
| 463 | } |
| 464 | |
| 465 | f.assertEvents() |
| 466 | f.WriteFile(file, "hello") |
| 467 | f.assertEvents(file) |
| 468 | } |
| 469 | |
| 470 | func TestWatchCountInnerFile(t *testing.T) { |
| 471 | f := newNotifyFixture(t) |
nothing calls this directly
no test coverage detected