mirror of
https://github.com/golang/go
synced 2024-11-22 18:24:48 -07:00
os: clean up after TestIssue60181
This test currently leaves two temp files lying around - ensure these are created in the current working directory (a temp dir) so that they get cleaned up when the test is complete. Change-Id: I9a29e24a2cd601de3ab39c421830ee2bcda76516 Reviewed-on: https://go-review.googlesource.com/c/go/+/597317 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: Ian Lance Taylor <iant@google.com> Auto-Submit: Ian Lance Taylor <iant@google.com>
This commit is contained in:
parent
b31e9a63a4
commit
8bc32ab6b1
@ -376,14 +376,14 @@ func TestIssue60181(t *testing.T) {
|
||||
|
||||
want := "hello gopher"
|
||||
|
||||
a, err := CreateTemp("", "a")
|
||||
a, err := CreateTemp(".", "a")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
a.WriteString(want[:5])
|
||||
a.Close()
|
||||
|
||||
b, err := CreateTemp("", "b")
|
||||
b, err := CreateTemp(".", "b")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user