1
0
mirror of https://github.com/golang/go synced 2024-11-17 08:04:46 -07:00
go/misc/cgo/errors
Bryan C. Mills 814d92230a misc/cgo/errors: fix erroneous regexp detection
I had passed 1 instead of 2 to the SplitAfterN call in
errorstest.check, so all of the cases were erroneously falling through
to the non-regexp case (and passing even if the actual error didn't
match).

Now, we use bytes.HasSuffix to check for the non-regexp case, so we
will not incorrectly match a regexp comment to the non-regexp case.

updates #13467

Change-Id: Ia6be928a495425f2b7bae5001bd01346e115dcfa
Reviewed-on: https://go-review.googlesource.com/63692
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-09-14 02:24:04 +00:00
..
src misc/cgo/errors: port test.bash to Go 2017-09-13 17:45:52 +00:00
errors_test.go misc/cgo/errors: fix erroneous regexp detection 2017-09-14 02:24:04 +00:00
ptr_test.go misc/cgo/errors: port test.bash to Go 2017-09-13 17:45:52 +00:00