Procedure scan-dump-times in scandump.exp uses a printable version of
the scanned pattern in the line reported to the test summary but others
in that file don't.  This patch fixes that in the remaining procedures
in scandump.exp.  The primary advantage of using the printable pattern
is with patterns that include newlines, to keep the pattern all on the
same line in the test summary.

Tested on i686-pc-linux-gnu for gcc and g++.  OK for trunk?

Janis
2012-06-26  Janis Johnson  <jani...@codesourcery.com>

        * lib/scandump.exp (scan-dump, scan-dump-not, scan-dump-dem,
        scan-dump-dem-not): Use printable pattern in test name.

Index: lib/scandump.exp
===================================================================
--- lib/scandump.exp    (revision 188974)
+++ lib/scandump.exp    (working copy)
@@ -47,8 +47,9 @@
 
     set testcase [testname-for-summary]
 
+    set printable_pattern [make_pattern_printable [lindex $args 1]]
     set suf [dump-suffix [lindex $args 2]]
-    set testname "$testcase scan-[lindex $args 0]-dump $suf \"[lindex $args 
1]\""
+    set testname "$testcase scan-[lindex $args 0]-dump $suf 
\"$printable_pattern\""
     set src [file tail [lindex $testcase 0]]
     set output_file "[glob -nocomplain $src.[lindex $args 2]]"
     if { $output_file == "" } {
@@ -126,8 +127,9 @@
     }
 
     set testcase [testname-for-summary]
+    set printable_pattern [make_pattern_printable [lindex $args 1]]
     set suf [dump-suffix [lindex $args 2]]
-    set testname "$testcase scan-[lindex $args 0]-dump-not $suf \"[lindex 
$args 1]\""
+    set testname "$testcase scan-[lindex $args 0]-dump-not $suf 
\"$printable_pattern\""
     set src [file tail [lindex $testcase 0]]
     set output_file "[glob -nocomplain $src.[lindex $args 2]]"
     if { $output_file == "" } {
@@ -178,8 +180,9 @@
     }
 
     set testcase [testname-for-summary]
+    set printable_pattern [make_pattern_printable [lindex $args 1]]
     set suf [dump-suffix [lindex $args 2]]
-    set testname "$testcase scan-[lindex $args 0]-dump-dem $suf \"[lindex 
$args 1]\""
+    set testname "$testcase scan-[lindex $args 0]-dump-dem $suf 
\"$printable_pattern\""
     set src [file tail [lindex $testcase 0]]
     set output_file "[glob -nocomplain $src.[lindex $args 2]]"
     if { $output_file == "" } {
@@ -229,8 +232,9 @@
     }
 
     set testcase [testname-for-summary]
+    set printable_pattern [make_pattern_printable [lindex $args 1]
     set suf [dump-suffix [lindex $args 2]]
-    set testname "$testcase scan-[lindex $args 0]-dump-dem-not $suf \"[lindex 
$args 1]\""
+    set testname "$testcase scan-[lindex $args 0]-dump-dem-not $suf 
\"$printable_pattern\""
     set src [file tail [lindex $testcase 0]]
     set output_file "[glob -nocomplain $src.[lindex $args 2]]"
     if { $output_file == "" } {

Reply via email to