summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Blandy <jimb@codesourcery.com>2002-05-10 16:29:39 +0000
committerJim Blandy <jimb@codesourcery.com>2002-05-10 16:29:39 +0000
commit838cc20541ffbf1dec69c8c963f4ebdf8df218bf (patch)
tree4bf5e0eba6c534d894ac361f0594dfaa478f232b
parent51a635c36ebfb42e21d51d62724495cdde401b0e (diff)
downloadgdb-838cc20541ffbf1dec69c8c963f4ebdf8df218bf.tar.gz
* 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.
-rw-r--r--gdb/testsuite/ChangeLog7
-rw-r--r--gdb/testsuite/gdb.base/printcmds.exp4
-rw-r--r--gdb/testsuite/lib/gdb.exp8
3 files changed, 17 insertions, 2 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 6c35655e762..a8be6a49ad7 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,10 @@
+2002-05-10 Jim Blandy <jimb@redhat.com>
+
+ * 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-06 Ben Elliston <bje@redhat.com>
From Graydon Hoare <graydon@redhat.com>
diff --git a/gdb/testsuite/gdb.base/printcmds.exp b/gdb/testsuite/gdb.base/printcmds.exp
index 6c4213e3d20..124318931b6 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 e47659983a9..3bdd49a9214 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -618,6 +618,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