]> Cypherpunks repositories - gostls13.git/commitdiff
mime/multipart: allow for temp files to be removed after tests are finished on Windows
authorAlex Brainman <alex.brainman@gmail.com>
Sat, 11 Jun 2011 06:23:44 +0000 (16:23 +1000)
committerAlex Brainman <alex.brainman@gmail.com>
Sat, 11 Jun 2011 06:23:44 +0000 (16:23 +1000)
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/4605044

src/pkg/mime/multipart/formdata_test.go

index 9424c3778e12e90854031284b433e12fc48f6c66..4bc4649317a8b7d3cfee03e9aaa7c6b1d70561a1 100644 (file)
@@ -31,10 +31,12 @@ func TestReadForm(t *testing.T) {
        if _, ok := fd.(*os.File); ok {
                t.Error("file is *os.File, should not be")
        }
+       fd.Close()
        fd = testFile(t, f.File["fileb"][0], "fileb.txt", filebContents)
        if _, ok := fd.(*os.File); !ok {
                t.Errorf("file has unexpected underlying type %T", fd)
        }
+       fd.Close()
 }
 
 func testFile(t *testing.T, fh *FileHeader, efn, econtent string) File {