]> Cypherpunks repositories - gostls13.git/commitdiff
os: add File.Close for TestFileStatNUL
authorchangwang ma <machangwang.cn@gmail.com>
Fri, 25 Oct 2024 15:41:42 +0000 (23:41 +0800)
committerGopher Robot <gobot@golang.org>
Mon, 28 Oct 2024 13:39:27 +0000 (13:39 +0000)
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>

src/os/os_windows_test.go

index fb95499c17ff464a33c432c790d673a46247ecd0..d9c8fe3db975c566120ca64fbb3b0e542b083739 100644 (file)
@@ -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)