(t *testing.T)
| 310 | } |
| 311 | |
| 312 | func TestWriteGoodLink(t *testing.T) { |
| 313 | if runtime.GOOS == "windows" { |
| 314 | t.Skip("no user-space symlinks on windows") |
| 315 | } |
| 316 | f := newNotifyFixture(t) |
| 317 | |
| 318 | goodFile := filepath.Join(f.paths[0], "goodFile") |
| 319 | err := os.WriteFile(goodFile, []byte("hello"), 0o644) |
| 320 | if err != nil { |
| 321 | t.Fatal(err) |
| 322 | } |
| 323 | |
| 324 | link := filepath.Join(f.paths[0], "goodFileSymlink") |
| 325 | err = os.Symlink(goodFile, link) |
| 326 | if err != nil { |
| 327 | t.Fatal(err) |
| 328 | } |
| 329 | |
| 330 | f.assertEvents(goodFile, link) |
| 331 | } |
| 332 | |
| 333 | func TestWatchBrokenLink(t *testing.T) { |
| 334 | if runtime.GOOS == "windows" { |
nothing calls this directly
no test coverage detected