diff options
author | Cherry Mui <cherryyz@google.com> | 2021-05-18 18:25:44 -0400 |
---|---|---|
committer | Cherry Mui <cherryyz@google.com> | 2021-05-19 01:09:20 +0000 |
commit | 15a374d5c1336e9cc2f8b615477d5917e9477440 (patch) | |
tree | c586cdb0cd728fee563c3b9109f18f720f3106bd /test | |
parent | eeadce2d871358306f2a95b0cfbe809ea017932a (diff) | |
download | go-15a374d5c1336e9cc2f8b615477d5917e9477440.tar.gz go-15a374d5c1336e9cc2f8b615477d5917e9477440.zip |
test: check portable error message on issue46234.go
issue46234.go expects an error output "segmentation violation",
which is UNIX-specific. Check for "nil pointer dereference"
instead, which is emitted by the Go runtime and should work on all
platforms.
Should fix Windows builders.
Change-Id: I3f5a66a687d43cae5eaf6a9e942b877e5a248900
Reviewed-on: https://go-review.googlesource.com/c/go/+/321072
Trust: Cherry Mui <cherryyz@google.com>
Run-TryBot: Cherry Mui <cherryyz@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/fixedbugs/issue46234.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/fixedbugs/issue46234.go b/test/fixedbugs/issue46234.go index c669cc01a6..8e7eb8bf8d 100644 --- a/test/fixedbugs/issue46234.go +++ b/test/fixedbugs/issue46234.go @@ -96,7 +96,7 @@ func main() { log.Fatalf("Passed, expected an error") } - want := []byte("segmentation violation") + want := []byte("nil pointer dereference") if !bytes.Contains(output, want) { log.Fatalf("Unmatched error message %q:\nin\n%s\nError: %v", want, output, err) } |