aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.python
diff options
context:
space:
mode:
authorTom de Vries <tdevries@suse.de>2023-06-13 12:24:17 +0200
committerTom de Vries <tdevries@suse.de>2023-06-13 12:24:17 +0200
commit3e543c18b174a6d68277d27f27a98eb9515d20c5 (patch)
treef33bbca0ef7f0e16ec5c3f02f855fdcc45cb9035 /gdb/testsuite/gdb.python
parentcc313a1d84d3b76d5a4f6208d1aa6c0e99c0d132 (diff)
downloadbinutils-3e543c18b174a6d68277d27f27a98eb9515d20c5.zip
binutils-3e543c18b174a6d68277d27f27a98eb9515d20c5.tar.gz
binutils-3e543c18b174a6d68277d27f27a98eb9515d20c5.tar.bz2
[gdb/testsuite] Fix and add prompt anchoring in tuiterm
There is a test-case that contains a unit test for tuiterm: gdb.tui/tuiterm.exp. However, this only excercises the tuiterm itself, and not the functions that interact with it, like Term::command. Add a new test-case gdb.tui/tuiterm-2.exp that: - overrides proc accept_gdb_output (to be able simulate incorrect responses while avoiding the timeout), - overrides proc send_gdb (to be able to call Term::command without a gdb instance, such that all tuiterm input is generated by the test-case). - issues Term::command calls, and - checks whether they behave correctly. This exposes a problem in Term::command. The "prompt before command" regexp starts with a bit that is supposed to anchor the prompt to the border: ... set str "(^|\|)$gdb_prompt $str" ... but that doesn't work due to insufficient escaping. Fix this by adding the missing escape: ... set str "(^|\\|)$gdb_prompt $str" ... Futhermore, the "prompt after command" regexp in Term::wait_for has no anchoring at all: ... set prompt_wait_for "$gdb_prompt \$" ... so add that as well. Tested on x86_64-linux.
Diffstat (limited to 'gdb/testsuite/gdb.python')
0 files changed, 0 insertions, 0 deletions