blob: 7a57a5627a8ee0307316f21a9b6844d6b8a1bf21 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
# Copyright 2023 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Regression test for PR30056.
tuiterm_env
save_vars { env(LC_ALL) } {
setenv LC_ALL C.UTF-8
# Start terminal.
Term::clean_restart 24 80
# Start TUI.
if {![Term::enter_tui]} {
unsupported "TUI not supported"
return
}
# Send "^R", starting reverse-i-search.
send_gdb "\022"
Term::wait_for_region_contents 0 $Term::_cur_row $Term::_cols 1 \
[string_to_regexp "(reverse-i-search)`': "]
# Send "xyz".
send_gdb "xyz"
Term::wait_for_region_contents 0 $Term::_cur_row $Term::_cols 1 \
[string_to_regexp "(failed reverse-i-search)`xyz': "]
# Send arrow-right.
send_gdb "\033\[C"
# We need to the arrow-right to be processed by readline, before we
# send the following ^C. Waiting 1 ms seems to do that.
after 1
# Send ^C.
send_gdb "\003"
gdb_assert { [Term::wait_for "Quit"] } "Control-C"
}
|