diff options
author | Daniel Jacobowitz <drow@false.org> | 2009-11-12 19:54:39 +0000 |
---|---|---|
committer | Daniel Jacobowitz <drow@false.org> | 2009-11-12 19:54:39 +0000 |
commit | b598bfda9b19e4d2b0f2ac646708315e123bdbbb (patch) | |
tree | b898c382920a9c865d4d2539f7a66fa75a9a9e4f /gdb/testsuite/lib | |
parent | d48cc9dd6fbc2e64af32b5ec1680e8255eeb4edd (diff) | |
download | gdb-b598bfda9b19e4d2b0f2ac646708315e123bdbbb.zip gdb-b598bfda9b19e4d2b0f2ac646708315e123bdbbb.tar.gz gdb-b598bfda9b19e4d2b0f2ac646708315e123bdbbb.tar.bz2 |
testsuite/
* lib/gdb.exp (gdb_test_multiple): Handle "y or [n]", "[y] or n",
and the breakpoint menu. Do not call perror if a prompt is seen.
Consume the following GDB prompt.
* gdb.cp/method2.exp (test_break): Use gdb_test_multiple.
* gdb.cp/namespace.exp: Use gdb_test.
* gdb.cp/templates.exp: Use gdb_test.
(test_template_breakpoints): Use gdb_test_multiple.
Diffstat (limited to 'gdb/testsuite/lib')
-rw-r--r-- | gdb/testsuite/lib/gdb.exp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index c9ce905..b5e55ec 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -763,10 +763,16 @@ proc gdb_test_multiple { command message user_code } { fail "$message" set result -1 } - -re "\\(y or n\\) " { + -re "\\((y or n|y or \\\[n\\\]|\\\[y\\\] or n)\\) " { send_gdb "n\n" - perror "Got interactive prompt." - fail "$message" + gdb_expect -re "$gdb_prompt $" + fail "$message (got interactive prompt)" + set result -1 + } + -re "\\\[0\\\] cancel\r\n\\\[1\\\] all.*\r\n> $" { + send_gdb "0\n" + gdb_expect -re "$gdb_prompt $" + fail "$message (got breakpoint menu)" set result -1 } eof { |