aboutsummaryrefslogtreecommitdiff
path: root/libgo/go
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2011-12-12 18:45:08 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2011-12-12 18:45:08 +0000
commitfe4bf59fb63c95ee07aa8a62a4ecf0a93e8d6083 (patch)
treed6bea7b27d93ac44fd842d6a2f7aee78a962f049 /libgo/go
parent0b27284847b2547bcd4e8fce52ad0e906563af4b (diff)
downloadgcc-fe4bf59fb63c95ee07aa8a62a4ecf0a93e8d6083.zip
gcc-fe4bf59fb63c95ee07aa8a62a4ecf0a93e8d6083.tar.gz
gcc-fe4bf59fb63c95ee07aa8a62a4ecf0a93e8d6083.tar.bz2
net/http: delete temporary files.
From-SVN: r182256
Diffstat (limited to 'libgo/go')
-rw-r--r--libgo/go/net/http/filetransport_test.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/libgo/go/net/http/filetransport_test.go b/libgo/go/net/http/filetransport_test.go
index 265a3b9..039926b 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)))