Add check for readline support to more GDB tab-completion tests.
authorSandra Loosemore <sandra@codesourcery.com>
Sun, 4 Aug 2019 21:26:39 +0000 (14:26 -0700)
committerSandra Loosemore <sandra@codesourcery.com>
Sun, 4 Aug 2019 21:26:39 +0000 (14:26 -0700)
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.

gdb/testsuite/ChangeLog
gdb/testsuite/lib/completion-support.exp

index 91814f24c4eb82952cd27f984f28193d88e4d02a..b4c834d84e993be45c8f9d8da355a13e891ca7c7 100644 (file)
@@ -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.
index abe48b4a7f7786206cec55b28f12386c21d65879..e081b3283620927294e8f52b2e6ca2df6c197cd5 100644 (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
 }