* lib/gdb.exp (gdb_test_exact): Turn \n in pattern into \r\n.
This commit is contained in:
parent
94dba90cdf
commit
e7dc69ffc0
2 changed files with 11 additions and 0 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue