(t *testing.T)
| 152 | } |
| 153 | |
| 154 | func TestWatchesAreRecursive(t *testing.T) { |
| 155 | f := newNotifyFixture(t) |
| 156 | |
| 157 | root := f.TempDir("root") |
| 158 | |
| 159 | // add a sub directory |
| 160 | subPath := filepath.Join(root, "sub") |
| 161 | f.MkdirAll(subPath) |
| 162 | |
| 163 | // watch parent |
| 164 | f.watch(root) |
| 165 | |
| 166 | f.fsync() |
| 167 | f.events = nil |
| 168 | // change sub directory |
| 169 | changeFilePath := filepath.Join(subPath, "change") |
| 170 | f.WriteFile(changeFilePath, "change") |
| 171 | |
| 172 | f.assertEvents(changeFilePath) |
| 173 | } |
| 174 | |
| 175 | func TestNewDirectoriesAreRecursivelyWatched(t *testing.T) { |
| 176 | f := newNotifyFixture(t) |
nothing calls this directly
no test coverage detected