aboutsummaryrefslogtreecommitdiff
path: root/src/os/os_windows_test.go
diff options
context:
space:
mode:
authorchangwang ma <machangwang.cn@gmail.com>2024-10-25 23:41:42 +0800
committerGopher Robot <gobot@golang.org>2024-10-28 13:39:27 +0000
commit7a256adbafed8599d7c355422f50d4b95b60bf46 (patch)
treeca32f97537ee287666057781641f985dbe5b9312 /src/os/os_windows_test.go
parentc77ca70f44b2efd71c13e0322b70a977408c2750 (diff)
downloadgo-7a256adbafed8599d7c355422f50d4b95b60bf46.tar.xz
os: add File.Close for TestFileStatNUL
Change-Id: I9f8b0beed16f38d71055cdc7606306d93fb535c2 Reviewed-on: https://go-review.googlesource.com/c/go/+/622655 Reviewed-by: Cherry Mui <cherryyz@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Ian Lance Taylor <iant@google.com> Auto-Submit: Ian Lance Taylor <iant@google.com>
Diffstat (limited to 'src/os/os_windows_test.go')
-rw-r--r--src/os/os_windows_test.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/os/os_windows_test.go b/src/os/os_windows_test.go
index fb95499c17..d9c8fe3db9 100644
--- a/src/os/os_windows_test.go
+++ b/src/os/os_windows_test.go
@@ -990,6 +990,8 @@ func TestFileStatNUL(t *testing.T) {
if err != nil {
t.Fatal(err)
}
+ defer f.Close()
+
fi, err := f.Stat()
if err != nil {
t.Fatal(err)