From: Bryan C. Mills Date: Wed, 24 May 2023 12:35:18 +0000 (-0400) Subject: cmd/go: accept trailing text in compiler errors in tests X-Git-Tag: go1.21rc1~297 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=c7f0a8c443d91a7dcf5962936903aff7e43124cb;p=gostls13.git cmd/go: accept trailing text in compiler errors in tests This fixes tests that were broken in CL 497716. Change-Id: I85fa8f093e04a97b7b83e2f6840f6261e08f59e0 Reviewed-on: https://go-review.googlesource.com/c/go/+/497875 TryBot-Result: Gopher Robot Run-TryBot: Bryan Mills Auto-Submit: Bryan Mills Reviewed-by: Carlos Amedee --- diff --git a/src/cmd/go/testdata/script/mod_install_pkg_version.txt b/src/cmd/go/testdata/script/mod_install_pkg_version.txt index 712375a6f8..a4a26ba9f3 100644 --- a/src/cmd/go/testdata/script/mod_install_pkg_version.txt +++ b/src/cmd/go/testdata/script/mod_install_pkg_version.txt @@ -128,7 +128,7 @@ cd tmp go mod init m go get example.com/cmd@v1.0.0 ! go build example.com/cmd/... -stderr 'err[/\\]err.go:3:9: undefined: DoesNotCompile$' +stderr 'err[/\\]err.go:3:9: undefined: DoesNotCompile( .*)?$' cd .. go install example.com/cmd/...@v1.0.0 diff --git a/src/cmd/go/testdata/script/mod_vendor_goversion.txt b/src/cmd/go/testdata/script/mod_vendor_goversion.txt index 9e3618a218..838c5575b0 100644 --- a/src/cmd/go/testdata/script/mod_vendor_goversion.txt +++ b/src/cmd/go/testdata/script/mod_vendor_goversion.txt @@ -7,7 +7,7 @@ go build example.net/need117 ! go build example.net/bad114 -stderr '^bad114[/\\]bad114.go:15:2: duplicate method Y$' +stderr '^bad114[/\\]bad114.go:15:2: duplicate method Y( .*)?$' # With a vendor/modules.txt lacking language versions, the world is topsy-turvy, @@ -43,7 +43,7 @@ go build example.net/need117 grep '^## explicit; go 1.13$' vendor/modules.txt ! go build example.net/bad114 -stderr '^vendor[/\\]example\.net[/\\]bad114[/\\]bad114.go:15:2: duplicate method Y$' +stderr '^vendor[/\\]example\.net[/\\]bad114[/\\]bad114.go:15:2: duplicate method Y( .+)?$' -- go.mod -- module example.net/m