]> go.fuhry.dev Git - fsnotify.git/commitdiff
Linux test: need to watch file for rename
authorChris Howey <chris@howey.me>
Wed, 19 Oct 2011 23:21:26 +0000 (16:21 -0700)
committerChris Howey <chris@howey.me>
Wed, 19 Oct 2011 23:21:26 +0000 (16:21 -0700)
fsnotify_test.go

index e0cc422e9988ed5d4348cf4afe98a090c6b3ca12..89554f9f706d3e5673f01c445ccd707aead4e858 100644 (file)
@@ -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 {