]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
net/http: delete temporary files.
authorIan Lance Taylor <ian@gcc.gnu.org>
Mon, 12 Dec 2011 18:45:08 +0000 (18:45 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Mon, 12 Dec 2011 18:45:08 +0000 (18:45 +0000)
From-SVN: r182256

libgo/go/net/http/filetransport_test.go

index 265a3b903e94b975ded227d5f753678f7d883ffc..039926b5382154e0fd44f9724c3a61489a9345cb 100644 (file)
@@ -7,6 +7,7 @@ package http_test
 import (
        "io/ioutil"
        "net/http"
+       "os"
        "path/filepath"
        "testing"
 )
@@ -28,6 +29,8 @@ func TestFileTransport(t *testing.T) {
        fname := filepath.Join(dname, "foo.txt")
        err = ioutil.WriteFile(fname, []byte("Bar"), 0644)
        check("WriteFile", err)
+       defer os.Remove(dname)
+       defer os.Remove(fname)
 
        tr := &http.Transport{}
        tr.RegisterProtocol("file", http.NewFileTransport(http.Dir(dname)))