mirror of
https://github.com/golang/go
synced 2024-11-20 10:44:41 -07:00
exp/winfsnotify: fix test
R=alex.brainman, mattn.jp CC=golang-dev https://golang.org/cl/5311047
This commit is contained in:
parent
64306c9fd0
commit
9e1a2adf07
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user