(t *testing.T)
| 468 | } |
| 469 | |
| 470 | func TestWatchCountInnerFile(t *testing.T) { |
| 471 | f := newNotifyFixture(t) |
| 472 | |
| 473 | root := f.paths[0] |
| 474 | a := f.JoinPath(root, "a") |
| 475 | b := f.JoinPath(a, "b") |
| 476 | file := f.JoinPath(b, "bigFile") |
| 477 | f.WriteFile(file, "hello") |
| 478 | f.assertEvents(a, b, file) |
| 479 | |
| 480 | expectedWatches := 3 |
| 481 | if isRecursiveWatcher() { |
| 482 | expectedWatches = 1 |
| 483 | } |
| 484 | assert.Equal(t, expectedWatches, int(numberOfWatches.Value())) |
| 485 | } |
| 486 | |
| 487 | func isRecursiveWatcher() bool { |
| 488 | return runtime.GOOS == "darwin" || runtime.GOOS == "windows" |
nothing calls this directly
no test coverage detected