From b598bfda9b19e4d2b0f2ac646708315e123bdbbb Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Thu, 12 Nov 2009 19:54:39 +0000 Subject: 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. --- gdb/testsuite/lib/gdb.exp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'gdb/testsuite/lib') 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 { -- cgit v1.1