diff options
author | Russ Cox <rsc@golang.org> | 2009-11-11 15:48:38 -0800 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2009-11-11 15:48:38 -0800 |
commit | 7e33f6d7248cf665df319bdd407b222d329f15c7 (patch) | |
tree | ebc8b39c183bcc7d89ff3a351f72bbfca1b474ac | |
parent | fd3a509330185a0b3c5b90acb999b42540253299 (diff) | |
download | golang-7e33f6d7248cf665df319bdd407b222d329f15c7.tar.gz |
fix TestRemoveAll again (tested as root this time).
Fixes issue 22.
R=r
http://codereview.appspot.com/154069
-rw-r--r-- | src/pkg/os/path_test.go | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/pkg/os/path_test.go b/src/pkg/os/path_test.go index 9b11ac163..9b01bd5b6 100644 --- a/src/pkg/os/path_test.go +++ b/src/pkg/os/path_test.go @@ -134,14 +134,13 @@ func TestRemoveAll(t *testing.T) { if perr.Path != dpath { t.Fatalf("RemoveAll %q failed at %q not %q", path, perr.Path, dpath) } - } - - if err = Chmod(dpath, 0777); err != nil { - t.Fatalf("Chmod %q 0777: %s", dpath, err) - } - for _, s := range []string{fpath, path + "/zzz"} { - if _, err := Lstat(s); err == nil { - t.Fatalf("Lstat %q succeeded after partial RemoveAll", s) + if err = Chmod(dpath, 0777); err != nil { + t.Fatalf("Chmod %q 0777: %s", dpath, err) + } + for _, s := range []string{fpath, path + "/zzz"} { + if _, err := Lstat(s); err == nil { + t.Fatalf("Lstat %q succeeded after partial RemoveAll", s) + } } } if err = RemoveAll(path); err != nil { |