aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/path/filepath/path_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/pkg/path/filepath/path_test.go')
-rw-r--r--src/pkg/path/filepath/path_test.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/pkg/path/filepath/path_test.go b/src/pkg/path/filepath/path_test.go
index b8766588cf..e4b4da43cb 100644
--- a/src/pkg/path/filepath/path_test.go
+++ b/src/pkg/path/filepath/path_test.go
@@ -684,10 +684,15 @@ func TestAbs(t *testing.T) {
}
defer os.RemoveAll(root)
+ wd, err := os.Getwd()
+ if err != nil {
+ t.Fatal("getwd failed: ", err)
+ }
err = os.Chdir(root)
if err != nil {
t.Fatal("chdir failed: ", err)
}
+ defer os.Chdir(wd)
for _, dir := range absTestDirs {
err = os.Mkdir(dir, 0777)