go-test.exp: retain any characters at end of ERROR line

* go.test/go-test.exp (errchk): Retain any characters at the end
	of the comment.
This commit is contained in:
Ian Lance Taylor 2020-12-14 20:39:53 -08:00
parent e2e0c7b86f
commit 773a4106bb

View file

@ -124,8 +124,7 @@ proc errchk { test opts } {
# to
# // { dg-error {string} }
# The latter is what go-dg-runtest expects.
# Retain an optional trailing */, for syntax/semi6.go.
regsub {// (GCCGO_)?ERROR "([^"]*)" *(\*/)?$} $copy_line "// \{ dg-error \{\\2\} \}\\3" out_line
regsub {// (GCCGO_)?ERROR "([^"]*)"([^"]*)$} $copy_line "// \{ dg-error \{\\2\} \}\\3" out_line
puts $fdout $out_line
}