diff options
author | Sandra Loosemore <sandra@codesourcery.com> | 2020-06-23 09:33:31 -0700 |
---|---|---|
committer | Sandra Loosemore <sandra@codesourcery.com> | 2020-06-23 09:33:31 -0700 |
commit | bb8d126033bc7982808323da80ac8649e27bb3eb (patch) | |
tree | 030c1170a28ee778b642c96aa57b6561b403be8e /gdb | |
parent | d0dded5bc251e506ef65b13696c624ea8669ed6e (diff) | |
download | gdb-bb8d126033bc7982808323da80ac8649e27bb3eb.zip gdb-bb8d126033bc7982808323da80ac8649e27bb3eb.tar.gz gdb-bb8d126033bc7982808323da80ac8649e27bb3eb.tar.bz2 |
Adjust command completion output when TUI is disabled
The history-scrolling commands "+", "-", "<" and ">" are only known to
GDB when TUI is enabled. This means the "complete pipe " command
produces different output depending on whether TUI is present, which
in turn caused
FAIL: gdb.base/shell.exp: cmd complete "pipe "
This patch provides different patterns for that test depending on
whether or not TUI is available.
2020-06-23 Sandra Loosemore <sandra@codesourcery.com>
gdb/testsuite/
* lib/completion-support.exp (test_gdb_completion_offers_commands):
Adjust for omitted commands when TUI is disabled.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/testsuite/lib/completion-support.exp | 17 |
2 files changed, 18 insertions, 4 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 18d1947..0864d75 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2020-06-23 Sandra Loosemore <sandra@codesourcery.com> + + * lib/completion-support.exp (test_gdb_completion_offers_commands): + Adjust for omitted commands when TUI is disabled. + 2020-06-23 Gary Benson <gbenson@redhat.com> Pedro Alves <palves@redhat.com> diff --git a/gdb/testsuite/lib/completion-support.exp b/gdb/testsuite/lib/completion-support.exp index 18eac82..51436cc 100644 --- a/gdb/testsuite/lib/completion-support.exp +++ b/gdb/testsuite/lib/completion-support.exp @@ -555,10 +555,19 @@ proc test_gdb_completion_offers_commands {input_line} { # Force showing two commands. gdb_test_no_output "set max-completions 2" "" - test_gdb_complete_multiple $input_line "" "" { - "!" - "+" - } "" "" 1 + # TUI adds additional commands to the possible completions, so we + # need different patterns depending on whether or not it is enabled. + if { [skip_tui_tests] } { + test_gdb_complete_multiple $input_line "" "" { + "!" + "actions" + } "" "" 1 + } else { + test_gdb_complete_multiple $input_line "" "" { + "!" + "+" + } "" "" 1 + } # Restore. gdb_test_no_output "set max-completions $max_completions" "" |