diff options
author | Andrew Burgess <aburgess@redhat.com> | 2022-12-20 15:45:32 +0000 |
---|---|---|
committer | Andrew Burgess <aburgess@redhat.com> | 2023-01-25 10:55:44 +0000 |
commit | 6db98f026e4dcd7ca9d069542a7bbb3f4539482b (patch) | |
tree | e7e9a8e099e40bb7232173197245b40c17bb6acc /gdb/testsuite | |
parent | 6789344ab22f7fbce94a31297b994f85685b90c6 (diff) | |
download | gdb-6db98f026e4dcd7ca9d069542a7bbb3f4539482b.zip gdb-6db98f026e4dcd7ca9d069542a7bbb3f4539482b.tar.gz gdb-6db98f026e4dcd7ca9d069542a7bbb3f4539482b.tar.bz2 |
gdb/tui: better filtering of tab completion results for focus command
While working on the previous couple of commits, I noticed that the
'focus' command would happily suggest 'status' as a possible focus
completion, even though the 'status' window is non-focusable, and,
after the previous couple of commits, trying to focus the status
window will result in an error.
This commit improves the tab-completion results for the focus command
so that the status window is not included.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r-- | gdb/testsuite/gdb.tui/completion.exp | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/gdb/testsuite/gdb.tui/completion.exp b/gdb/testsuite/gdb.tui/completion.exp index a3b3114..97d0f80 100644 --- a/gdb/testsuite/gdb.tui/completion.exp +++ b/gdb/testsuite/gdb.tui/completion.exp @@ -15,8 +15,9 @@ require allow_tui_tests -gdb_exit -gdb_start +tuiterm_env + +clean_restart if {[target_info exists gdb,nointerrupts]} { return @@ -56,3 +57,16 @@ with_test_prefix "completion of layout names" { with_test_prefix "completion of focus command" { test_tab_completion "focus" "cmd *next *prev *src *" } + +# Now run some completion tests when TUI mode is enabled. +Term::clean_restart 24 80 +if {![Term::prepare_for_tui]} { + unsupported "TUI not supported" + return +} + +Term::command "layout src" +Term::command "complete focus " +Term::dump_screen +Term::check_region_contents "check focus completions" 0 17 80 5 \ + "focus cmd\\s*focus next\\s*focus prev\\s*focus src\\s*$gdb_prompt" |