go-test.exp: don't quote already-quoted parentheses
authorIan Lance Taylor <iant@golang.org>
Mon, 7 Dec 2020 17:36:15 +0000 (09:36 -0800)
committerIan Lance Taylor <iant@golang.org>
Mon, 7 Dec 2020 17:36:15 +0000 (09:36 -0800)
* go.test/go-test.exp (errchk): Don't backslash quote parentheses
that are already backslash quoted.

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

index 8f17cb3db71ec0024523ce0f805f9a9a533fab6c..d129e1c65daa3f012adfc5c428afe602caa99f27 100644 (file)
@@ -131,11 +131,11 @@ proc errchk { test opts } {
            set index [string first "dg-error" $out_line]
            regsub -start $index -all "\(\[^\\\\]\)\}\(.\)" $out_line "\\1\\\\\[\\\}\\\\\]\\2" out_line
        }
-       if [string match "*dg-error*\(*" $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
        }
-       if [string match "*dg-error*\)*\}" $out_line] {
+       if [string match "*dg-error*\\\[^\\\\\]\)*\}" $out_line] {
            set index [string first "dg-error" $out_line]
            regsub -start $index -all "\\\\\\\)\(.\)" $out_line "\\\\\[\\\)\\\\\]\\1" out_line
        }