diff options
author | Keith Seitz <keiths@redhat.com> | 2013-05-21 19:11:50 +0000 |
---|---|---|
committer | Keith Seitz <keiths@redhat.com> | 2013-05-21 19:11:50 +0000 |
commit | 52c935b6f53a31185e201524b479e18f3b925981 (patch) | |
tree | 406666dc3504c1ce530c7b50d669c605553fcca0 | |
parent | bd9673a4ded96ea5c108601501c8e59003ea1be6 (diff) | |
download | gdb-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.
-rw-r--r-- | gdb/testsuite/ChangeLog | 13 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/filesym.exp | 29 |
2 files changed, 28 insertions, 14 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index b93485a..8d77b7d 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -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. 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 |