aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/lib
diff options
context:
space:
mode:
authorTom de Vries <tdevries@suse.de>2023-04-24 22:08:53 +0200
committerTom de Vries <tdevries@suse.de>2023-04-24 22:08:53 +0200
commit4fa173cfd79f8a00c091f8a5a119bc2b064cc716 (patch)
tree86500b55fffd9c3be37d4b8660cdd5cfef51ce91 /gdb/testsuite/lib
parent41966608a1ee2bde59772c41aae6ec95b309ff26 (diff)
downloadbinutils-4fa173cfd79f8a00c091f8a5a119bc2b064cc716.zip
binutils-4fa173cfd79f8a00c091f8a5a119bc2b064cc716.tar.gz
binutils-4fa173cfd79f8a00c091f8a5a119bc2b064cc716.tar.bz2
[gdb/testsuite] Fix -wrap in presence of -prompt in gdb_test_multiple
While writing a gdb_test_multiple call in a test-case I tried to use -wrap in combination with -prompt and found out that it doesn't work, because -wrap uses "$gdb_prompt $" instead of $prompt_regexp. Fix this by making -wrap use $prompt_regexp. Tested on x86_64-linux.
Diffstat (limited to 'gdb/testsuite/lib')
-rw-r--r--gdb/testsuite/lib/gdb.exp2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index 45588d8..d30e2a5 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -1126,7 +1126,7 @@ proc gdb_test_multiple { command message args } {
if { $wrap_pattern } {
# Wrap subst_item as is done for the gdb_test PATTERN argument.
lappend $current_list \
- "\[\r\n\]*(?:$subst_item)\[\r\n\]+$gdb_prompt $"
+ "\[\r\n\]*(?:$subst_item)\[\r\n\]+$prompt_regexp"
set wrap_pattern 0
} else {
lappend $current_list $subst_item