diff options
author | Nathaniel Smith <njs@codesourcery.com> | 2004-02-12 17:47:47 +0000 |
---|---|---|
committer | Mark Mitchell <mmitchel@gcc.gnu.org> | 2004-02-12 17:47:47 +0000 |
commit | 9dfc74a3ca1a13573044e8d2c3a7e7c1e623e72f (patch) | |
tree | 1ec7d67961e87153874348cf2766e2040b68eefd /gcc/testsuite | |
parent | 7ea98c5a502af3c3c443911b34d7bbf5e8a65600 (diff) | |
download | gcc-9dfc74a3ca1a13573044e8d2c3a7e7c1e623e72f.zip gcc-9dfc74a3ca1a13573044e8d2c3a7e7c1e623e72f.tar.gz gcc-9dfc74a3ca1a13573044e8d2c3a7e7c1e623e72f.tar.bz2 |
* lib/scanasm.exp (dg-scan): Quote pattern before display.
From-SVN: r77715
Diffstat (limited to 'gcc/testsuite')
-rw-r--r-- | gcc/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/testsuite/lib/scanasm.exp | 9 |
2 files changed, 10 insertions, 3 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index a0e5f70..c4cdf7e 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2004-02-12 Nathaniel Smith <njs@codesourcery.com> + + * lib/scanasm.exp (dg-scan): Quote pattern before display. + 2004-02-12 Hartmut Penner <hpenner@de.ibm.com> * g++.dg/simd-2.C: xfail on ppc64-linux. diff --git a/gcc/testsuite/lib/scanasm.exp b/gcc/testsuite/lib/scanasm.exp index cf414fb..79d93cb 100644 --- a/gcc/testsuite/lib/scanasm.exp +++ b/gcc/testsuite/lib/scanasm.exp @@ -48,11 +48,14 @@ proc dg-scan { name positive testcase output_file orig_args } { set text [read $fd] close $fd - set match [regexp -- [lindex $orig_args 0] $text] + set pattern [lindex $orig_args 0] + set printable_pattern [string map {\t \\t \n \\n \r \\r \\ \\\\} $pattern] + + set match [regexp -- $pattern $text] if { $match == $positive } { - pass "$testcase $name [lindex $orig_args 0]" + pass "$testcase $name $printable_pattern" } else { - fail "$testcase $name [lindex $orig_args 0]" + fail "$testcase $name $printable_pattern" } } |