From: Fred Fish Date: Tue, 6 Aug 1996 19:20:25 +0000 (+0000) Subject: * lib/gdb.exp (gdb_test_exact): Turn \n in pattern into \r\n. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e7dc69ffc0192b66a5c4324bed43fdb40580a6cc;p=binutils-gdb.git * lib/gdb.exp (gdb_test_exact): Turn \n in pattern into \r\n. --- diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 8c52eb6f4bd..8f93d2d98dd 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,7 @@ +Tue Aug 6 10:23:04 1996 Tom Tromey + + * lib/gdb.exp (gdb_test_exact): Turn \n in pattern into \r\n. + Mon Aug 5 18:11:53 1996 Fred Fish * gdb.base/signals.exp (test_handle_all_print): Test separately for diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index 376b56ed12a..ea411c4a81a 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -477,6 +477,13 @@ proc gdb_test_exact { args } { set command [lindex $args 0] set pattern [string_to_regexp [lindex $args 1]] + # It is most natural to write the pattern argument with only + # embedded \n's, especially if you are trying to avoid Tcl quoting + # problems. But expect really wants to see \r\n in patterns. So + # transform the pattern here. First transform \r\n back to \n, in + # case some users of gdb_test_exact already do the right thing. + regsub -all "\r\n" $pattern "\n" pattern + regsub -all "\n" $pattern "\r\n" pattern if [llength $args]==3 then { set message [lindex $args 2] } else {