* gdb.base/filesym.exp: Use gdb_test_multiple instead of

gdb_expect.
	Add test to flush the remaining input buffer so that this
	file passes testsuite/12649.
This commit is contained in:
Keith Seitz 2013-05-21 19:11:50 +00:00
parent bd9673a4de
commit 52c935b6f5
2 changed files with 27 additions and 13 deletions

View File

@ -1,3 +1,11 @@
2013-05-21 Keith Seitz <keiths@redhat.com>
Pedro Alves <palves@redhat.com>
* gdb.base/filesym.exp: Use gdb_test_multiple instead of
gdb_expect.
Add test to flush the remaining input buffer so that this
file passes testsuite/12649.
2013-05-21 Philippe Waroquiers <philippe.waroquiers@skynet.be>
* gdb.base/catch-signal-fork.exp: New file.
@ -66,6 +74,11 @@
* gdb.ada/complete.exp: Add test verifying completion using
the "tab" key.
2013-05-15 Keith Seitz <keiths@redhat.com>
* gdb.base/filesym.exp: New completer test.
* gdb.base/filesym.c: New file.
2013-05-15 Pedro Alves <palves@redhat.com>
* gdb.base/fixsection.c: Remove attribution.

View File

@ -26,25 +26,26 @@ if {[prepare_for_testing $testfile.exp $testfile $srcfile debug]} {
# complete to "filesym"; completing again, we expect the symbol name and the
# filename (in that order).
set tst "complete on \"filesy\""
send_gdb "break filesy\t"
gdb_expect {
-re "m\$" {
pass "complete on \"filesy\""
gdb_test_multiple "" $tst {
-re "break filesy\\\x07m\$" {
pass $tst
# Now ask for the completion list
set tst "completion list for \"filesym\""
send_gdb "\t\t"
gdb_expect {
-re ".*filesym\[ \t\]+filesym.c.*$gdb_prompt break filesym\$" {
pass "completion list for \"filesym\""
}
gdb_test_multiple "" $tst {
-re "\\\x07\r\nfilesym\[ \t\]+filesym.c\[ \t\]+\r\n$gdb_prompt " {
pass $tst
default {
fail "completion list for \"filesym\""
# Flush the rest of the output by creating the breakpoint.
# This ensures this file passes testsuite/12649.
send_gdb "\n"
gdb_test "" "Breakpoint 1.*" "set breakpoint at filesym"
}
}
}
default {
fail "complete on \"filesy\""
}
}
unset -nocomplain tst