This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[patch, testsuite] check for readline support in gdb.base/history-duplicates.exp
- From: Sandra Loosemore <sandra at codesourcery dot com>
- To: gdb-patches <gdb-patches at sourceware dot org>
- Date: Tue, 15 Sep 2015 12:43:05 -0600
- Subject: [patch, testsuite] check for readline support in gdb.base/history-duplicates.exp
- Authentication-results: sourceware.org; auth=none
The testcase gdb.base/history-duplicates.exp checks the interaction
between "set history remove-duplicates" and scrolling back through
command history with ^P, thus it only makes sense if readline support is
present. I've copied the test that currently appears in readline.exp
and other places. OK to commit?
-Sandra
2015-09-15 Sandra Loosemore <sandra@codesourcery.com>
gdb/testsuite/
* gdb.base/history-duplicates.exp: Skip if no readline support.
diff --git a/gdb/testsuite/gdb.base/history-duplicates.exp b/gdb/testsuite/gdb.base/history-duplicates.exp
index 11bb1ed..1c3c2c2 100644
--- a/gdb/testsuite/gdb.base/history-duplicates.exp
+++ b/gdb/testsuite/gdb.base/history-duplicates.exp
@@ -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.