[testsuite,obvious] Add check for readline support to more GDB tab-completion tests.
Commit Message
This patch makes the new-ish completion-support.exp infrastructure skip
tab-completion tests if there is no readline support. This fixes
several ERRORs we've run into while testing on remote Windows host via ssh.
I thought this was obvious enough to check in immediately since it is
consistent with some previous patches I've contributed to do similar
things, e.g. commits
4ee9b0c53a8055b869dfe424846bc00eb0cd0c8f
515b89b30c18dae6b91e57ec2dd336919bb4578d
-Sandra
commit 26655f53069a2f8a8ccbc6b60537149383d28be1
Author: Sandra Loosemore <sandra@codesourcery.com>
Date: Sun Aug 4 14:26:39 2019 -0700
Add check for readline support to more GDB tab-completion tests.
2019-08-04 Sandra Loosemore <sandra@codesourcery.com>
gdb/testsuite/
* lib/completion-support.exp (test_gdb_complete_none): Skip
tab completion tests if no readline support.
(test_gdb_complete_unique_re): Likewise.
(test_gdb_complete_multiple): Likewise.
@@ -1,3 +1,10 @@
+2019-08-04 Sandra Loosemore <sandra@codesourcery.com>
+
+ * lib/completion-support.exp (test_gdb_complete_none): Skip
+ tab completion tests if no readline support.
+ (test_gdb_complete_unique_re): Likewise.
+ (test_gdb_complete_multiple): Likewise.
+
2019-08-03 Philippe Waroquiers <philippe.waroquiers@skynet.be>
* gdb.base/info_sources.exp: New file.
@@ -217,7 +217,9 @@ proc test_gdb_complete_cmd_multiple { cmd_prefix completion_word completion_list
# Test that completing LINE completes to nothing.
proc test_gdb_complete_none { input_line } {
- test_gdb_complete_tab_none $input_line
+ if { [readline_is_used] } {
+ test_gdb_complete_tab_none $input_line
+ }
test_gdb_complete_cmd_none $input_line
}
@@ -239,7 +241,9 @@ proc test_gdb_complete_none { input_line } {
proc test_gdb_complete_unique_re { input_line complete_line_re {append_char " "} {max_completions 0}} {
set append_char_re [string_to_regexp $append_char]
- test_gdb_complete_tab_unique $input_line $complete_line_re $append_char_re
+ if { [readline_is_used] } {
+ test_gdb_complete_tab_unique $input_line $complete_line_re $append_char_re
+ }
# Trim INPUT_LINE and COMPLETE LINE, for the case we're completing
# a command with leading whitespace. Leading command whitespace
@@ -282,7 +286,9 @@ proc test_gdb_complete_multiple {
cmd_prefix completion_word add_completed_line completion_list
{start_quote_char ""} {end_quote_char ""} {max_completions 0}
} {
- test_gdb_complete_tab_multiple "$cmd_prefix$completion_word" $add_completed_line $completion_list $max_completions
+ if { [readline_is_used] } {
+ test_gdb_complete_tab_multiple "$cmd_prefix$completion_word" $add_completed_line $completion_list $max_completions
+ }
test_gdb_complete_cmd_multiple $cmd_prefix $completion_word $completion_list $start_quote_char $end_quote_char $max_completions
}