From: Ian Lance Taylor Date: Mon, 7 Dec 2020 17:36:15 +0000 (-0800) Subject: go-test.exp: don't quote already-quoted parentheses X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=16a2a458809103d1c382c09c62b09697aac9b935;p=gcc.git go-test.exp: don't quote already-quoted parentheses * go.test/go-test.exp (errchk): Don't backslash quote parentheses that are already backslash quoted. --- diff --git a/gcc/testsuite/go.test/go-test.exp b/gcc/testsuite/go.test/go-test.exp index 8f17cb3db71..d129e1c65da 100644 --- a/gcc/testsuite/go.test/go-test.exp +++ b/gcc/testsuite/go.test/go-test.exp @@ -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 }