From 86327cdcf546d33afffaabbea01626a78a705868 Mon Sep 17 00:00:00 2001 From: Alex Brainman Date: Fri, 27 May 2011 09:52:15 +1000 Subject: [PATCH] os: TestMkdirAll should not fail to delete _test/_TestMkdirAll_ on Windows R=golang-dev, r CC=golang-dev https://golang.org/cl/4515142 --- src/pkg/os/path_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pkg/os/path_test.go b/src/pkg/os/path_test.go index 483bb639535..1aabe46fb72 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)