1 # Copyright 2015-2020 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/>.
19 if {[skip_tui_tests] || [target_info exists gdb,nointerrupts]} {
23 gdb_test_no_output "set max-completions unlimited"
25 # TAB-complete INPUT_LINE, and expect EXPECTED_RE as completion match
27 proc test_tab_completion {input_line expected_re} {
30 set test "tab completion"
31 send_gdb "$input_line\t\t\t"
32 gdb_test_multiple "" "$test" {
33 -re "$expected_re\r\n$gdb_prompt " {
34 gdb_test_multiple "" "$test" {
35 -re "^$input_line $" {
42 set test "quit command input"
43 gdb_test_multiple "" "$test" {
50 with_test_prefix "completion of layout names" {
51 test_tab_completion "layout" "asm *next *prev *regs *split *src *"
54 with_test_prefix "completion of focus command" {
55 test_tab_completion "focus" "cmd *next *prev *src *"