From c4b7bc2bea4cf67926e48f3c32f297d2f17c04fa Mon Sep 17 00:00:00 2001 From: Jim Blandy Date: Fri, 10 May 2002 18:38:09 +0000 Subject: [PATCH] * gdb.base/printcmds.exp (test_integer_literals_rejected): Recognize more detailed error message produced by the macro expander's lexical analyzer. * lib/gdb.exp (test_print_reject): Same. --- gdb/testsuite/ChangeLog | 7 +++++++ gdb/testsuite/gdb.base/printcmds.exp | 4 ++-- gdb/testsuite/lib/gdb.exp | 8 ++++++++ 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index da21de4..e6f1b62 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2002-05-10 Jim Blandy + + * gdb.base/printcmds.exp (test_integer_literals_rejected): + Recognize more detailed error message produced by the macro + expander's lexical analyzer. + * lib/gdb.exp (test_print_reject): Same. + 2002-05-09 Mark Kettenis * gdb.c++/method.exp: Fix typo. diff --git a/gdb/testsuite/gdb.base/printcmds.exp b/gdb/testsuite/gdb.base/printcmds.exp index 6c4213e..1243189 100644 --- a/gdb/testsuite/gdb.base/printcmds.exp +++ b/gdb/testsuite/gdb.base/printcmds.exp @@ -98,8 +98,8 @@ proc test_integer_literals_rejected {} { global gdb_prompt test_print_reject "p 0x" - gdb_test "p ''" "Empty character constant\\." - gdb_test "p '''" "Empty character constant\\." + gdb_test "p ''" "(Empty character constant\\.|A character constant must contain at least one character\\.)" + gdb_test "p '''" "(Empty character constant\\.|A character constant must contain at least one character\\.)" test_print_reject "p '\\'" # Note that this turns into "p '\\\'" at gdb's input. diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index 71d937a..c41ed72 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -627,6 +627,14 @@ proc test_print_reject { args } { pass "reject $sendthis" return 1 } + -re "Unmatched single quote.*$gdb_prompt $" { + pass "reject $sendthis" + return 1 + } + -re "A character constant must contain at least one character.*$gdb_prompt $" { + pass "reject $sendthis" + return 1 + } -re "$expectthis.*$gdb_prompt $" { pass "reject $sendthis" return 1 -- 2.7.4