diff options
author | Fred Fish <fnf@specifix.com> | 1996-08-06 19:20:25 +0000 |
---|---|---|
committer | Fred Fish <fnf@specifix.com> | 1996-08-06 19:20:25 +0000 |
commit | e7dc69ffc0192b66a5c4324bed43fdb40580a6cc (patch) | |
tree | da21fd5e909238cb27be15819c879636ca4e3bdf /gdb/testsuite/lib | |
parent | 94dba90cdf3e1ebeb23512d995fdfdd35db95b79 (diff) | |
download | binutils-e7dc69ffc0192b66a5c4324bed43fdb40580a6cc.zip binutils-e7dc69ffc0192b66a5c4324bed43fdb40580a6cc.tar.gz binutils-e7dc69ffc0192b66a5c4324bed43fdb40580a6cc.tar.bz2 |
* lib/gdb.exp (gdb_test_exact): Turn \n in pattern into \r\n.
Diffstat (limited to 'gdb/testsuite/lib')
-rw-r--r-- | gdb/testsuite/lib/gdb.exp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index 376b56e..ea411c4 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 { |