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 | 2cda46dc82ba15d61c067aaeb29b0d26e722af02 (patch) | |
tree | 78f593da77145994b9c259ad296e2d03d3917b63 | |
parent | 2643f742a5b7c5db8a51fbe0b5b824190c9d5571 (diff) | |
download | go-2cda46dc82ba15d61c067aaeb29b0d26e722af02.tar.gz go-2cda46dc82ba15d61c067aaeb29b0d26e722af02.zip |
fix TestRemoveAll again (tested as root this time).
Fixes #22.
R=r
https://golang.org/cl/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 9b11ac1636..9b01bd5b64 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 { |