diff options
Diffstat (limited to 'libgo/go/os/path_test.go')
-rw-r--r-- | libgo/go/os/path_test.go | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/libgo/go/os/path_test.go b/libgo/go/os/path_test.go index c1e3fb35436..96f0f41e639 100644 --- a/libgo/go/os/path_test.go +++ b/libgo/go/os/path_test.go @@ -5,6 +5,7 @@ package os_test import ( + "io/ioutil" . "os" "path/filepath" "runtime" @@ -171,20 +172,23 @@ func TestMkdirAllWithSymlink(t *testing.T) { return } - tmpDir := TempDir() + tmpDir, err := ioutil.TempDir("", "TestMkdirAllWithSymlink-") + if err != nil { + t.Fatal(err) + } + defer RemoveAll(tmpDir) + dir := tmpDir + "/dir" - err := Mkdir(dir, 0755) + err = Mkdir(dir, 0755) if err != nil { t.Fatalf("Mkdir %s: %s", dir, err) } - defer RemoveAll(dir) link := tmpDir + "/link" err = Symlink("dir", link) if err != nil { t.Fatalf("Symlink %s: %s", link, err) } - defer RemoveAll(link) path := link + "/foo" err = MkdirAll(path, 0755) |