1 # Copyright
(C
) 2011-2022 Free Software Foundation
, Inc.
3 # This
program is free software
; you can redistribute it and
/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation
; either version
3 of the License
, or
6 #
(at your option
) any later version.
8 # This
program is distributed in the hope that it will be useful
,
9 # but WITHOUT
ANY WARRANTY
; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License
for more details.
13 # You should have received a copy of the GNU General Public License
14 # along with this
program.
If not
, see
<http
://www.gnu.org
/licenses
/>.
17 set inputrc $
{srcdir
}/$
{subdir
}/$
{testfile
}.inputrc
19 if { [gdb_compile
"${srcdir}/${subdir}/${srcfile}" "${binfile}" object {debug}] != "" } {
20 untested
"failed to compile"
24 # INPUTRC gets reset
for the next testfile.
25 setenv INPUTRC $inputrc
26 clean_restart $
{binfile
}
28 if { ![readline_is_used
] } {
29 unsupported
"completion doesn't work when readline isn't used."
33 gdb_test_no_output
"set width 50"
34 gdb_test_no_output
"set height 3"
38 set test
"bell for more message"
39 gdb_test_multiple
"" $test {
46 set test
"more message for 01 and 02"
47 gdb_test_multiple
"" $test {
48 -re
"^\r\nsymbol_01_length_40_____________________\r\nsymbol_02_length_40_____________________\r\n--More--$" {
56 # There
get some VT100 characters printed.
59 set test
"more message for 03"
60 gdb_test_multiple
"" $test {
61 -re
"\rsymbol_03_length_40_____________________\r\n--More--$" {
66 #
"$gdb_prompt $" will not match as $cmd gets output: $gdb_prompt p symbol_0
67 # And
"$gdb_prompt p symbol_0" cannot be matched as the default "$gdb_prompt $"
68 # string from gdb_test_multiple could match earlier.
71 set test
"more finish for 04"
72 gdb_test_multiple
"" $test {
73 -re
"\rsymbol_04_length_40_____________________\r\n$gdb_prompt " {
78 gdb_test
"foo" {No symbol "symbol_0foo" in current context\.} "abort more message"
82 set test
"bell for ask message"
83 gdb_test_multiple
"" $test {
90 set test
"ask message"
91 gdb_test_multiple
"" $test {
92 -re
"^\r\nDisplay all 5 possibilities\\? \\(y or n\\)$" {
102 set test
"ask message for 01 and 02"
103 gdb_test_multiple
"" $test {
104 -re
"^\r\nsymbol_01_length_40_____________________\r\nsymbol_02_length_40_____________________\r\n--More--$" {
109 # There
get some VT100 characters printed.
110 # See the
"$gdb_prompt " match like in "more finish for 04".
113 set test
"ask message no"
114 gdb_test_multiple
"" $test {
115 -re
"\r$gdb_prompt " {
120 gdb_test
"foo" {No symbol "symbol_foo" in current context\.} "abort ask message"