(t *testing.T)
| 245 | } |
| 246 | |
| 247 | func TestRemoveAndAddBack(t *testing.T) { |
| 248 | f := newNotifyFixture(t) |
| 249 | |
| 250 | path := filepath.Join(f.paths[0], "change") |
| 251 | |
| 252 | d1 := []byte("hello\ngo\n") |
| 253 | err := os.WriteFile(path, d1, 0o644) |
| 254 | if err != nil { |
| 255 | t.Fatal(err) |
| 256 | } |
| 257 | f.watch(path) |
| 258 | f.assertEvents(path) |
| 259 | |
| 260 | err = os.Remove(path) |
| 261 | if err != nil { |
| 262 | t.Fatal(err) |
| 263 | } |
| 264 | |
| 265 | f.assertEvents(path) |
| 266 | f.events = nil |
| 267 | |
| 268 | err = os.WriteFile(path, d1, 0o644) |
| 269 | if err != nil { |
| 270 | t.Fatal(err) |
| 271 | } |
| 272 | |
| 273 | f.assertEvents(path) |
| 274 | } |
| 275 | |
| 276 | func TestSingleFile(t *testing.T) { |
| 277 | f := newNotifyFixture(t) |
nothing calls this directly
no test coverage detected