mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
internal/godebug: check error from os.ReadFile in test
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>
This commit is contained in:
parent
8071f2a169
commit
28d389ef30
1 changed files with 3 additions and 0 deletions
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue