From 8bc32ab6b11a4428f8f0d0eec8db02d520ce422f Mon Sep 17 00:00:00 2001 From: Joel Sing Date: Wed, 10 Jul 2024 23:20:11 +1000 Subject: [PATCH] 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 --- src/os/os_unix_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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) } -- 2.48.1