aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.base/filesym.exp
diff options
context:
space:
mode:
authorKeith Seitz <keiths@redhat.com>2013-05-21 19:11:50 +0000
committerKeith Seitz <keiths@redhat.com>2013-05-21 19:11:50 +0000
commit52c935b6f53a31185e201524b479e18f3b925981 (patch)
tree406666dc3504c1ce530c7b50d669c605553fcca0 /gdb/testsuite/gdb.base/filesym.exp
parentbd9673a4ded96ea5c108601501c8e59003ea1be6 (diff)
downloadgdb-52c935b6f53a31185e201524b479e18f3b925981.zip
gdb-52c935b6f53a31185e201524b479e18f3b925981.tar.gz
gdb-52c935b6f53a31185e201524b479e18f3b925981.tar.bz2
* 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.
Diffstat (limited to 'gdb/testsuite/gdb.base/filesym.exp')
-rw-r--r--gdb/testsuite/gdb.base/filesym.exp29
1 files changed, 15 insertions, 14 deletions
diff --git a/gdb/testsuite/gdb.base/filesym.exp b/gdb/testsuite/gdb.base/filesym.exp
index c9e9c20..af87d97 100644
--- a/gdb/testsuite/gdb.base/filesym.exp
+++ b/gdb/testsuite/gdb.base/filesym.exp
@@ -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\""
- }
-
- default {
- fail "completion list for \"filesym\""
+ gdb_test_multiple "" $tst {
+ -re "\\\x07\r\nfilesym\[ \t\]+filesym.c\[ \t\]+\r\n$gdb_prompt " {
+ pass $tst
+
+ # 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