From: Ian Lance Taylor Date: Mon, 12 Dec 2011 18:45:08 +0000 (+0000) Subject: net/http: delete temporary files. X-Git-Tag: releases/gcc-4.7.0~1595 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fe4bf59fb63c95ee07aa8a62a4ecf0a93e8d6083;p=thirdparty%2Fgcc.git net/http: delete temporary files. From-SVN: r182256 --- diff --git a/libgo/go/net/http/filetransport_test.go b/libgo/go/net/http/filetransport_test.go index 265a3b903e94..039926b53821 100644 --- a/libgo/go/net/http/filetransport_test.go +++ b/libgo/go/net/http/filetransport_test.go @@ -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)))