From: Sandra Loosemore Date: Sun, 4 Aug 2019 21:26:39 +0000 (-0700) Subject: Add check for readline support to more GDB tab-completion tests. X-Git-Url: http://git.efficios.com/?a=commitdiff_plain;h=26655f53069a2f8a8ccbc6b60537149383d28be1;p=deliverable%2Fbinutils-gdb.git Add check for readline support to more GDB tab-completion tests. 2019-08-04 Sandra Loosemore 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. --- diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 91814f24c4..b4c834d84e 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2019-08-04 Sandra Loosemore + + * 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 * gdb.base/info_sources.exp: New file. diff --git a/gdb/testsuite/lib/completion-support.exp b/gdb/testsuite/lib/completion-support.exp index abe48b4a7f..e081b32836 100644 --- a/gdb/testsuite/lib/completion-support.exp +++ b/gdb/testsuite/lib/completion-support.exp @@ -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 }