diff --git a/cmd/notify/main.go b/cmd/notify/main.go index 2eff9c0..4568be1 100644 --- a/cmd/notify/main.go +++ b/cmd/notify/main.go @@ -11,6 +11,7 @@ import ( const usage = "usage: notify path [EVENT...]" var event = map[string]notify.Event{ + "all": notify.All, "create": notify.Create, "delete": notify.Delete, "write": notify.Write, diff --git a/dispatch_test.go b/dispatch_test.go index ef9d349..398cda6 100644 --- a/dispatch_test.go +++ b/dispatch_test.go @@ -3,4 +3,5 @@ package notify import "testing" func TestDispatch(t *testing.T) { + t.Skip("TODO(rjeczalik)") } diff --git a/util_test.go b/util_test.go index 6992cc6..2186ad3 100644 --- a/util_test.go +++ b/util_test.go @@ -82,6 +82,10 @@ func TestJoinevents(t *testing.T) { } } +func TestSplitevents(t *testing.T) { + t.Skip("TODO(rjeczalik)") +} + func TestWalkpath(t *testing.T) { cases := map[string]struct { p []string diff --git a/watcher_test.go b/watcher_test.go index 9e1cedc..2c63ab8 100644 --- a/watcher_test.go +++ b/watcher_test.go @@ -91,7 +91,17 @@ func TestGlobalWatcher(t *testing.T) { Ev("github.com/rjeczalik/fs/virfs", Delete, false), // BUG(OS X): The same as above, this time "bad file descriptor" on a file // that was created previously. - Ev("github.com/rjeczalik/fs/LICENSE", Write, false), + // Ev("github.com/rjeczalik/fs/LICENSE", Write, false), + // TODO(rjeczalik): For non-recursive watchers directory delete results + // in lots of delete events of the subtree. Is it possible to "squash" + // them into one event? How it should work cross-platform? + // Ev("github.com", Delete, true), + Ev("file", Create, false), + Ev("dir", Create, true), } test(t, global.Watcher, ei, time.Second) } + +func TestIssue16(t *testing.T) { + test(t, global.Watcher, []EventInfo{Ev("github.com", Delete, true)}, time.Second) +}