Check for readline support in gdb.base/history-duplicates.exp.
authorSandra Loosemore <sandra@codesourcery.com>
Mon, 14 Dec 2015 23:22:12 +0000 (15:22 -0800)
committerSandra Loosemore <sandra@codesourcery.com>
Mon, 14 Dec 2015 23:22:12 +0000 (15:22 -0800)
2015-12-14  Sandra Loosemore  <sandra@codesourcery.com>

gdb/testsuite/
* gdb.base/history-duplicates.exp: Skip if no readline support.

gdb/testsuite/ChangeLog
gdb/testsuite/gdb.base/history-duplicates.exp

index b46ccbde0497f03813d74d894411f968548ef545..56c3c474c70001342bf58fd7237db04a8c4c5318 100644 (file)
@@ -1,3 +1,7 @@
+2015-12-14  Sandra Loosemore  <sandra@codesourcery.com>
+
+       * gdb.base/history-duplicates.exp: Skip if no readline support.
+
 2015-12-14  Sandra Loosemore  <sandra@codesourcery.com>
 
        * gdb.base/gdbinit-history.exp: Skip for remote-host testing.
index 11bb1ed9caf8ac2dee88b86cdeefe969a0a368f6..1c3c2c2eb61150a4db88138c6baf27bb14d8355c 100644 (file)
@@ -51,9 +51,16 @@ proc run_print_on_each_thing { things } {
     }
 }
 
-# By default the option is set to 0.
 gdb_exit
 gdb_start
+
+# These tests require readline support.
+if { ![readline_is_used] } {
+    unsupported "readline isn't used."
+    return -1
+}
+
+# By default the option is set to 0.
 gdb_test "show history remove-duplicates" "is 0\\."
 
 # Test the "unlimited" setting.