1
0
mirror of https://github.com/golang/go synced 2024-11-20 10:24:40 -07:00

exp/winfsnotify: fix test

R=alex.brainman, mattn.jp
CC=golang-dev
https://golang.org/cl/5311047
This commit is contained in:
Hector Chu 2011-10-20 08:10:58 +01:00
parent 64306c9fd0
commit 9e1a2adf07

View File

@ -70,15 +70,11 @@ func TestNotifyEvents(t *testing.T) {
if _, err = file.WriteString("hello, world"); err != nil {
t.Fatalf("failed to write to test file: %s", err)
}
if err = file.Sync(); err != nil {
t.Fatalf("failed to sync test file: %s", err)
}
expect(t, watcher.Event, testFile, FS_MODIFY)
expect(t, watcher.Event, testFile, FS_MODIFY)
if err = file.Close(); err != nil {
t.Fatalf("failed to close test file: %s", err)
}
expect(t, watcher.Event, testFile, FS_MODIFY)
expect(t, watcher.Event, testFile, FS_MODIFY)
if err = os.Rename(testFile, testFile2); err != nil {
t.Fatalf("failed to rename test file: %s", err)