diff mbox series

Go testsuite patch committed: Permit */ at end of ERROR line

Message ID CAOyqgcXq4crO6Wb3=662KMGGvO2k42upWmu3VPi+PEwMr2C5zw@mail.gmail.com
State New
Headers show
Series Go testsuite patch committed: Permit */ at end of ERROR line | expand

Commit Message

Ian Lance Taylor Dec. 2, 2020, 2:20 a.m. UTC
This patch to the Go testsuite driver go-test.exp permits a */ at the
end of a ERROR line.  This will be used for a test that has no final
newline.  Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu.
Committed to mainline.

Ian

* go.test/go-test.exp (errchk): Permit trailing */ on ERROR line.
b906750ff826bb40cee7db1490e08449f439e333
diff mbox series

Patch

diff --git a/gcc/testsuite/go.test/go-test.exp b/gcc/testsuite/go.test/go-test.exp
index 51f9b381d67..067f309a296 100644
--- a/gcc/testsuite/go.test/go-test.exp
+++ b/gcc/testsuite/go.test/go-test.exp
@@ -105,7 +105,7 @@  proc errchk { test opts } {
 	    set copy_line $out_line
 	}
 
-	regsub "// \(GCCGO_\)?ERROR \"\(\[^\"\]*\)\".*$" $copy_line "// \{ dg-error \"\\2\" \}" out_line
+	regsub "// \(GCCGO_\)?ERROR \"\(\[^\"\]*\)\" *\(\\*/\)?$" $copy_line "// \{ dg-error \"\\2\" \}\\3" out_line
 	if [string match "*dg-error*\\\[*" $out_line] {
 	    set index [string first "dg-error" $out_line]
 	    regsub -start $index -all "\\\\\\\[" $out_line "\\\\\\\\\\\[" out_line