aboutsummaryrefslogtreecommitdiff
path: root/libgo/go/exp/winfsnotify/winfsnotify_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'libgo/go/exp/winfsnotify/winfsnotify_test.go')
-rw-r--r--libgo/go/exp/winfsnotify/winfsnotify_test.go9
1 files changed, 8 insertions, 1 deletions
diff --git a/libgo/go/exp/winfsnotify/winfsnotify_test.go b/libgo/go/exp/winfsnotify/winfsnotify_test.go
index 59ac1624a26..4a1929a8397 100644
--- a/libgo/go/exp/winfsnotify/winfsnotify_test.go
+++ b/libgo/go/exp/winfsnotify/winfsnotify_test.go
@@ -7,6 +7,7 @@
package winfsnotify
import (
+ "io/ioutil"
"os"
"testing"
"time"
@@ -115,7 +116,13 @@ func TestNotifyClose(t *testing.T) {
t.Fatal("double Close() test failed: second Close() call didn't return")
}
- err := watcher.Watch("_test")
+ dir, err := ioutil.TempDir("", "wininotify")
+ if err != nil {
+ t.Fatalf("TempDir failed: %s", err)
+ }
+ defer os.RemoveAll(dir)
+
+ err = watcher.Watch(dir)
if err == nil {
t.Fatal("expected error on Watch() after Close(), got nil")
}