From: Chris Howey Date: Wed, 19 Oct 2011 23:21:26 +0000 (-0700) Subject: Linux test: need to watch file for rename X-Git-Tag: v1.7.2~455 X-Git-Url: https://go.fuhry.dev/?a=commitdiff_plain;h=21e72b301c0abb5399c20a8e3d5c536224399384;p=fsnotify.git Linux test: need to watch file for rename --- 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 {