mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-23 07:00:27 +08:00
net/http: delete temporary files.
From-SVN: r182256
This commit is contained in:
parent
0b27284847
commit
fe4bf59fb6
@ -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)))
|
||||
|
Loading…
x
Reference in New Issue
Block a user