mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-25 04:49:54 +08:00
[gdb/testsuite] Fix gdb.base/define.exp with check-read1
When running gdb.base/define.exp with check-read1, we get: ... show prompt^M Gdb's prompt is "(gdb) ".^M (gdb) PASS: gdb.base/define.exp: save gdb_prompt set prompt \(blah\) ^M (blah) PASS: gdb.base/define.exp: set gdb_prompt set prompt (gdb) PASS: gdb.base/define.exp: reset gdb_prompt ^M (gdb) FAIL: gdb.base/define.exp: define do-define ... The problem is that the "$gdb_prompt $" regexp here: ... gdb_test_multiple "set prompt $prior_prompt " "reset gdb_prompt" { -re "$gdb_prompt $" { pass "reset gdb_prompt" } } ... triggers for the echoing of the command "set prompt $prior_prompt " rather than for the prompt after the command has executed. Fix this by changing the regexp to "\r\n$gdb_prompt $". Tested on x86_64-linux. gdb/testsuite/ChangeLog: 2019-07-29 Tom de Vries <tdevries@suse.de> * gdb.base/define.exp: Add "\r\n" to "reset gdb_prompt" regexp.
This commit is contained in:
@ -1,3 +1,7 @@
|
||||
2019-07-29 Tom de Vries <tdevries@suse.de>
|
||||
|
||||
* gdb.base/define.exp: Add "\r\n" to "reset gdb_prompt" regexp.
|
||||
|
||||
2019-07-29 Tom de Vries <tdevries@suse.de>
|
||||
|
||||
PR gdb/24855
|
||||
|
@ -302,7 +302,7 @@ gdb_test_multiple "set prompt \\(blah\\) " "set gdb_prompt" {
|
||||
}
|
||||
|
||||
gdb_test_multiple "set prompt $prior_prompt " "reset gdb_prompt" {
|
||||
-re "$gdb_prompt $" {
|
||||
-re "\r\n$gdb_prompt $" {
|
||||
pass "reset gdb_prompt"
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user