]> Cypherpunks repositories - gostls13.git/commitdiff
os: TestMkdirAll should not fail to delete _test/_TestMkdirAll_ on Windows
authorAlex Brainman <alex.brainman@gmail.com>
Thu, 26 May 2011 23:52:15 +0000 (09:52 +1000)
committerAlex Brainman <alex.brainman@gmail.com>
Thu, 26 May 2011 23:52:15 +0000 (09:52 +1000)
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/4515142

src/pkg/os/path_test.go

index 483bb639535ddbc748c0b366d249a70fd8e3c23f..1aabe46fb72168796fca354ca27582dbdd157f5d 100644 (file)
@@ -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)