]> go.fuhry.dev Git - fsnotify.git/commitdiff
BSD Test: Change placement of watch for attrib
authorChris Howey <chris@howey.me>
Wed, 19 Oct 2011 23:23:58 +0000 (16:23 -0700)
committerChris Howey <chris@howey.me>
Wed, 19 Oct 2011 23:23:58 +0000 (16:23 -0700)
fsnotify_test.go

index 89554f9f706d3e5673f01c445ccd707aead4e858..4759b8be0464e1f03b2364c767578ebe4aae769d 100644 (file)
@@ -308,16 +308,16 @@ func TestFsnotifyAttrib(t *testing.T) {
        }
        f.Sync()
 
+       f.WriteString("data")
+       f.Sync()
+       f.Close()
+
        // Add a watch for testFile
        err = watcher.Watch(testFile)
        if err != nil {
                t.Fatalf("Watcher.Watch() failed: %s", err)
        }
 
-       f.WriteString("data")
-       f.Sync()
-       f.Close()
-
        cmd := exec.Command("chmod", "0700", testFile)
        err = cmd.Run()
        if err != nil {