diff options
| author | Alex Brainman <alex.brainman@gmail.com> | 2012-04-05 15:17:24 +1000 |
|---|---|---|
| committer | Alex Brainman <alex.brainman@gmail.com> | 2012-04-05 15:17:24 +1000 |
| commit | 4b943bded8b92296e50aaafe3e55fc4bc96b4f23 (patch) | |
| tree | b052352b5b92b4b478d32a29e912ccc7a4b10b33 /src/pkg/path/filepath | |
| parent | 4e9f7047dcf4ab0c059baaac4f5c5a06dc6b38bb (diff) | |
| download | go-4b943bded8b92296e50aaafe3e55fc4bc96b4f23.tar.xz | |
path/filepath: move out of temp directory before deleting it in TestAbs
Fixes #3476.
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5986045
Diffstat (limited to 'src/pkg/path/filepath')
| -rw-r--r-- | src/pkg/path/filepath/path_test.go | 5 |
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) |
