go-test.exp: permit trailing */ on ERROR line
authorIan Lance Taylor <iant@golang.org>
Wed, 2 Dec 2020 02:18:34 +0000 (18:18 -0800)
committerIan Lance Taylor <iant@golang.org>
Wed, 2 Dec 2020 02:20:22 +0000 (18:20 -0800)
* go.test/go-test.exp (errchk): Permit trailing */ on ERROR line.

gcc/testsuite/go.test/go-test.exp

index 51f9b381d677039d69da38ef1e9a3df9b8fb1517..067f309a2962219755b7cc88ed1c33ff637e4c18 100644 (file)
@@ -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