From: Joel Sing Date: Wed, 10 Jul 2024 13:20:11 +0000 (+1000) Subject: os: clean up after TestIssue60181 X-Git-Tag: go1.23rc2~2^2~4 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=8bc32ab6b11a4428f8f0d0eec8db02d520ce422f;p=gostls13.git 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 Reviewed-by: Dmitri Shuralyov Reviewed-by: Ian Lance Taylor Auto-Submit: Ian Lance Taylor --- diff --git a/src/os/os_unix_test.go b/src/os/os_unix_test.go index 6cbeae1b78..fcc75e5ee6 100644 --- a/src/os/os_unix_test.go +++ b/src/os/os_unix_test.go @@ -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) }