From: Alex Brainman Date: Thu, 26 May 2011 23:52:15 +0000 (+1000) Subject: os: TestMkdirAll should not fail to delete _test/_TestMkdirAll_ on Windows X-Git-Tag: weekly.2011-06-02~94 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=86327cdcf546d33afffaabbea01626a78a705868;p=gostls13.git os: TestMkdirAll should not fail to delete _test/_TestMkdirAll_ on Windows R=golang-dev, r CC=golang-dev https://golang.org/cl/4515142 --- diff --git a/src/pkg/os/path_test.go b/src/pkg/os/path_test.go index 483bb63953..1aabe46fb7 100644 --- a/src/pkg/os/path_test.go +++ b/src/pkg/os/path_test.go @@ -29,10 +29,11 @@ func TestMkdirAll(t *testing.T) { // Make file. fpath := path + "/file" - _, err = Create(fpath) + f, err := Create(fpath) if err != nil { t.Fatalf("create %q: %s", fpath, err) } + defer f.Close() // Can't make directory named after file. err = MkdirAll(fpath, 0777)