]> Cypherpunks repositories - gostls13.git/commitdiff
internal/godebug: check error from os.ReadFile in test
authorIan Lance Taylor <iant@golang.org>
Fri, 24 Jan 2025 01:37:29 +0000 (17:37 -0800)
committerGopher Robot <gobot@golang.org>
Tue, 28 Jan 2025 19:38:43 +0000 (11:38 -0800)
Change-Id: I4770443c8eaa12add2e04cbf9d18ebfbbd851162
Reviewed-on: https://go-review.googlesource.com/c/go/+/643259
Reviewed-by: Michael Pratt <mpratt@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Commit-Queue: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>

src/internal/godebug/godebug_test.go

index 692963035605051922e24a78a5c79c44eddf0c30..fe1e67225c9928bd66f0aa2b467ca8ef77cb5679 100644 (file)
@@ -109,6 +109,9 @@ func TestCmdBisect(t *testing.T) {
 
        var want []string
        src, err := os.ReadFile("godebug_test.go")
+       if err != nil {
+               t.Fatal(err)
+       }
        for i, line := range strings.Split(string(src), "\n") {
                if strings.Contains(line, "BISECT"+" "+"BUG") {
                        want = append(want, fmt.Sprintf("godebug_test.go:%d", i+1))