Skip to content

Commit 15a374d

Browse files
committed
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 <[email protected]> Run-TryBot: Cherry Mui <[email protected]> TryBot-Result: Go Bot <[email protected]> Reviewed-by: Than McIntosh <[email protected]>
1 parent eeadce2 commit 15a374d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/fixedbugs/issue46234.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ func main() {
9696
log.Fatalf("Passed, expected an error")
9797
}
9898

99-
want := []byte("segmentation violation")
99+
want := []byte("nil pointer dereference")
100100
if !bytes.Contains(output, want) {
101101
log.Fatalf("Unmatched error message %q:\nin\n%s\nError: %v", want, output, err)
102102
}

0 commit comments

Comments
 (0)