Skip tests on completion and readline when readline lib isn't used
[deliverable/binutils-gdb.git] / gdb / testsuite / lib / gdb.exp
index 4a6f930a58fce0642dea80307a9d7b0cccd88b91..608fae0b5bb859a238e5c071b068a1dff8c550e9 100644 (file)
@@ -1831,6 +1831,21 @@ proc supports_reverse {} {
     return 0
 }
 
+# Return 1 if readline library is used.
+
+proc readline_is_used { } {
+    global gdb_prompt
+
+    gdb_test_multiple "show editing" "" {
+       -re ".*Editing of command lines as they are typed is on\..*$gdb_prompt $" {
+           return 1
+       }
+       -re ".*$gdb_prompt $" {
+           return 0
+       }
+    }
+}
+
 # Return 1 if target is ELF.
 gdb_caching_proc is_elf_target {
     set me "is_elf_target"
This page took 0.035237 seconds and 4 git commands to generate.