aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2008-07-11 15:07:52 +0000
committerTom Tromey <tromey@redhat.com>2008-07-11 15:07:52 +0000
commit14032a66f195a775441d5c9ec66fe36a8e54d635 (patch)
treee97929c0437bf37c7663348ce2bb621420d4b4cb /gdb/testsuite
parent65fc9b77211c67d97824de129cfa0945be80ded0 (diff)
downloadgdb-14032a66f195a775441d5c9ec66fe36a8e54d635.zip
gdb-14032a66f195a775441d5c9ec66fe36a8e54d635.tar.gz
gdb-14032a66f195a775441d5c9ec66fe36a8e54d635.tar.bz2
gdb
* completer.c (complete_line_internal): New function, from complete_line. Add 'for_help' parameter. (complete_line): Use it. (command_completer): Move later. Rewrite. gdb/testsuite * gdb.base/completion.exp: Add 'help' completion test.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r--gdb/testsuite/ChangeLog4
-rw-r--r--gdb/testsuite/gdb.base/completion.exp17
2 files changed, 21 insertions, 0 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 8510e3f..16d4665 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2008-07-11 Tom Tromey <tromey@redhat.com>
+
+ * gdb.base/completion.exp: Add 'help' completion test.
+
2008-07-10 Jan Kratochvil <jan.kratochvil@redhat.com>
* gdb.base/randomize.exp: Remove dependency on tcl-8.4+.
diff --git a/gdb/testsuite/gdb.base/completion.exp b/gdb/testsuite/gdb.base/completion.exp
index f4ab1b1..4100db3 100644
--- a/gdb/testsuite/gdb.base/completion.exp
+++ b/gdb/testsuite/gdb.base/completion.exp
@@ -364,6 +364,23 @@ gdb_expect {
}
+send_gdb "help info wat\t"
+gdb_expect {
+ -re "^help info watchpoints $"\
+ { send_gdb "\n"
+ gdb_expect {
+ -re "Synonym for .*\r\n.*$gdb_prompt $"\
+ { pass "complete help info wat" }
+ -re ".*$gdb_prompt $" { fail "complete help info wat"}
+ timeout {fail "(timeout) complete help info wat"}
+ }
+ }
+ -re "^help info wat\\\x07$" { fail "complete (2) help info wat" }
+ -re ".*$gdb_prompt $" { fail "complete (3) help info wat" }
+ timeout { fail "(timeout) complete (3) help info wat" }
+ }
+
+
send_gdb "p \"break1\t"
sleep 1
gdb_expect {