aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite
diff options
context:
space:
mode:
authorAndrew Burgess <andrew.burgess@embecosm.com>2015-03-26 14:13:57 +0000
committerAndrew Burgess <andrew.burgess@embecosm.com>2015-05-21 20:48:10 +0200
commita014503004ad016d754bc9a4b143973ee18b0bbf (patch)
treeaf351f0aa2e26db40d7221932b774b2ff9f9218b /gdb/testsuite
parent7bd0be3a9b06dda7a9f3d54402d6f594faa4a1b1 (diff)
downloadgdb-a014503004ad016d754bc9a4b143973ee18b0bbf.zip
gdb-a014503004ad016d754bc9a4b143973ee18b0bbf.tar.gz
gdb-a014503004ad016d754bc9a4b143973ee18b0bbf.tar.bz2
gdb: Add completer for layout command.
Add layout name completion for the layout command. gdb/ChangeLog: * tui/tui-layout.c (layout_completer): New function. (_initialize_tui_layout): Set completer on layout command. gdb/testsuite/ChangeLog: * gdb.base/completion.exp: Add test for completion of layout names.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r--gdb/testsuite/ChangeLog5
-rw-r--r--gdb/testsuite/gdb.base/completion.exp19
2 files changed, 24 insertions, 0 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 3a947eb..49f56f4 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2015-05-21 Andrew Burgess <andrew.burgess@embecosm.com>
+
+ * gdb.base/completion.exp: Add test for completion of layout
+ names.
+
2015-05-20 Andrew Burgess <andrew.burgess@embecosm.com>
* lib/gdb.exp (skip_tui_tests): New proc.
diff --git a/gdb/testsuite/gdb.base/completion.exp b/gdb/testsuite/gdb.base/completion.exp
index f77bfe2..4c31bfc 100644
--- a/gdb/testsuite/gdb.base/completion.exp
+++ b/gdb/testsuite/gdb.base/completion.exp
@@ -859,3 +859,22 @@ gdb_test_multiple "" "$test" {
pass "$test"
}
}
+
+gdb_test_no_output "set max-completions unlimited"
+
+if {![skip_tui_tests]} {
+ set test "test completion of layout names"
+ send_gdb "layout\t\t\t"
+ gdb_test_multiple "" "$test" {
+ -re "asm *next *prev *regs *split *src *\r\n$gdb_prompt layout $" {
+ pass "$test"
+ }
+ }
+ send_gdb "\003"
+ set test "quit command input after testing layout completion"
+ gdb_test_multiple "" "$test" {
+ -re "$gdb_prompt $" {
+ pass "$test"
+ }
+ }
+}