diff options
author | Tom Tromey <tromey@redhat.com> | 2009-04-28 01:03:21 +0000 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2009-04-28 01:03:21 +0000 |
commit | 5b754aed7e552fb5dc279a43778e645fff963c63 (patch) | |
tree | 87ad7af9fe57d79ae5c44e9f27870f36b6807e82 /gdb/testsuite | |
parent | 9733feda3307b74cbb8baa0754b984440aa2118d (diff) | |
download | gdb-5b754aed7e552fb5dc279a43778e645fff963c63.tar.gz |
gdb
* c-exp.y (yylex): Handle '[' and ']' like '(' and ')'.
gdb/testsuite
* gdb.base/printcmds.exp (test_printf): Test comma operator in [].
Diffstat (limited to 'gdb/testsuite')
-rw-r--r-- | gdb/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/printcmds.exp | 3 |
2 files changed, 7 insertions, 0 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index fa6cd7d4ff0..61aee21934c 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2009-04-27 Tom Tromey <tromey@redhat.com> + + * gdb.base/printcmds.exp (test_printf): Test comma operator in []. + 2009-04-27 Doug Evans <dje@google.com> * gdb.threads/watchthreads.c (main): Initialize args before starting diff --git a/gdb/testsuite/gdb.base/printcmds.exp b/gdb/testsuite/gdb.base/printcmds.exp index b6f8a1f5d84..65ab3a45c15 100644 --- a/gdb/testsuite/gdb.base/printcmds.exp +++ b/gdb/testsuite/gdb.base/printcmds.exp @@ -666,6 +666,9 @@ proc test_printf {} { gdb_test "printf \"x=%d,y=%f,z=%d\\n\", 5, 6.0, 7" "x=5,y=6\.0+,z=7" gdb_test "printf \"%x %f, %c %x, %x, %f\\n\", 0xbad, -99.541, 'z',\ 0xfeedface, 0xdeadbeef, 5.0" "bad -99.54\[0-9\]+, z feedface, deadbeef, 5.0+" + + # Regression test for C lexer bug. + gdb_test "printf \"%c\\n\", \"x\"\[1,0\]" "x" } #Test printing DFP values with printf |