diff options
author | Ian Lance Taylor <iant@google.com> | 2013-10-24 19:08:45 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2013-10-24 19:08:45 +0000 |
commit | ccc23115665abdfad7394cc9dbc0c64e79a0164d (patch) | |
tree | b7434d12651da77eab5e8cfedc40f780d94a7ff8 /gcc | |
parent | 4a7cb16f83d70f77b4ba3a022486cedb3679394a (diff) | |
download | gcc-ccc23115665abdfad7394cc9dbc0c64e79a0164d.zip gcc-ccc23115665abdfad7394cc9dbc0c64e79a0164d.tar.gz gcc-ccc23115665abdfad7394cc9dbc0c64e79a0164d.tar.bz2 |
go-test.exp (errchk): Combine quoted strings in comments.
* go.test/go-test.exp (errchk): Combine quoted strings in
comments.
From-SVN: r204033
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/go.test/go-test.exp | 15 |
2 files changed, 20 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 02a436a..bbaf9fd 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2013-10-24 Ian Lance Taylor <iant@google.com> + + * go.test/go-test.exp (errchk): Combine quoted strings in + comments. + 2013-10-24 Cong Hou <congh@google.com> * gcc.c-torture/execute/20030125-1.c: Update. diff --git a/gcc/testsuite/go.test/go-test.exp b/gcc/testsuite/go.test/go-test.exp index 284bc99..1a63657 100644 --- a/gcc/testsuite/go.test/go-test.exp +++ b/gcc/testsuite/go.test/go-test.exp @@ -90,6 +90,21 @@ proc errchk { test opts } { puts $fdout $copy_line continue } + + # Combine quoted strings in comments, so that + # // ERROR "first error" "second error" + # turns into + # // ERROR "first error|second error" + # This format is used by the master testsuite to recognize + # multiple errors on a single line. We don't require that all + # the errors be present, but we do want to accept any of them. + set changed "" + while { $changed != $copy_line } { + set changed $copy_line + regsub "\(// \[^\"\]*\"\[^\"\]*\)\" \"" $copy_line "\\1|" out_line + set copy_line $out_line + } + regsub "// \(GCCGO_\)?ERROR \"\(\[^\"\]*\)\".*$" $copy_line "// \{ dg-error \"\\2\" \}" out_line if [string match "*dg-error*\\\[*" $out_line] { set index [string first "dg-error" $out_line] |