From 21e72b301c0abb5399c20a8e3d5c536224399384 Mon Sep 17 00:00:00 2001 From: Chris Howey Date: Wed, 19 Oct 2011 16:21:26 -0700 Subject: [PATCH] Linux test: need to watch file for rename --- fsnotify_test.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/fsnotify_test.go b/fsnotify_test.go index e0cc422..89554f9 100644 --- a/fsnotify_test.go +++ b/fsnotify_test.go @@ -224,6 +224,12 @@ func TestFsnotifyRename(t *testing.T) { f.Sync() f.Close() + // Add a watch for testFile + err = watcher.Watch(testFile) + if err != nil { + t.Fatalf("Watcher.Watch() failed: %s", err) + } + cmd := exec.Command("mv", testFile, testFileRenamed) err = cmd.Run() if err != nil { -- 2.50.1