]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
go-test.exp (errchk): Combine quoted strings in comments.
authorIan Lance Taylor <iant@google.com>
Thu, 24 Oct 2013 19:08:45 +0000 (19:08 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Thu, 24 Oct 2013 19:08:45 +0000 (19:08 +0000)
* go.test/go-test.exp (errchk): Combine quoted strings in
comments.

From-SVN: r204033

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

index 02a436a5c36d1053fbe3ec786df7bd167adffe32..bbaf9fd5aace01a88f49c9c3e43d6345cba62e0e 100644 (file)
@@ -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.
index 284bc99e2c0603f630e8d84e24de856f0f008bf4..1a636573d73120ff12fc775bc13e312e06493078 100644 (file)
@@ -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]