]> go.fuhry.dev Git - fsnotify.git/commit
Use "os.Rename()" in tests instead of "mv"
authorMartin Tournoij <martin@arp242.net>
Fri, 5 Aug 2022 15:03:18 +0000 (17:03 +0200)
committerMartin Tournoij <martin@arp242.net>
Fri, 5 Aug 2022 18:32:47 +0000 (20:32 +0200)
commitee33a655c06adcd00538cb9fb3d9fc5d8a727f42
treebccf28e76ee762e6b3dc86c1a401ab5cb6eb2500
parent9dd0568cd26c47668191d4aada248aff284288ae
Use "os.Rename()" in tests instead of "mv"

This was added in 00f2dfd (2011): "BSD Test: Need to use outside program
to trigger some events". All tests pass fine with just os.Rename(), so
just use that.

Might add another real-world test in the future for common tools like
mv, cp, vi, etc. because they don't always behave the same as library
calls, but calling mv in *only* the mv() helper is rather odd.

This also renames a few things in the kqueue helper for clarity, and
uses map[string]struct{} if we just use them for lookups to an
allocation (I originally tried to fix #488, but gave up on that for now,
hence the kqueue changes).
helpers_test.go
integration_test.go
kqueue.go