aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2008-10-22 16:38:09 +0000
committerTom Tromey <tromey@redhat.com>2008-10-22 16:38:09 +0000
commitc209f8472e7d7ea6abb109945f2c53a0b9a92d53 (patch)
treeee74641df441de6fa951f19d69b25b7037455f3c /gdb/testsuite
parent4267b19fc71aba8dafa490b9d71b90ef013f5cd9 (diff)
downloadgdb-c209f8472e7d7ea6abb109945f2c53a0b9a92d53.zip
gdb-c209f8472e7d7ea6abb109945f2c53a0b9a92d53.tar.gz
gdb-c209f8472e7d7ea6abb109945f2c53a0b9a92d53.tar.bz2
gdb
PR gdb/2506: * c-exp.y (string_exp): New production. (exp): Use it. gdb/testsuite * gdb.base/exprs.exp (test_expr): Add test for string concatenation.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r--gdb/testsuite/ChangeLog5
-rw-r--r--gdb/testsuite/gdb.base/exprs.exp4
2 files changed, 9 insertions, 0 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 9c3e624..dd4ccf5 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2008-10-22 Tom Tromey <tromey@redhat.com>
+
+ * gdb.base/exprs.exp (test_expr): Add test for string
+ concatenation.
+
2008-10-19 Pedro Alves <pedro@codesourcery.com>
* configure.ac: Output gdb.python/Makefile.
diff --git a/gdb/testsuite/gdb.base/exprs.exp b/gdb/testsuite/gdb.base/exprs.exp
index e25de77..484b5a4 100644
--- a/gdb/testsuite/gdb.base/exprs.exp
+++ b/gdb/testsuite/gdb.base/exprs.exp
@@ -248,3 +248,7 @@ gdb_test "print (void*) ((long long) (unsigned long) -1 + 1)" \
if [expr ! $ok] { setup_xfail "*-*-*" }
gdb_test "print (void*) (~((long long)(unsigned long) -1) - 1)" \
"warning: value truncated.*" "truncate (void*) 0xffffffff00000000 - 1"
+
+# String concatentation.
+test_expr "print \"x\" \"y\"" "\\$\[0-9\]* = \"xy\""
+test_expr "print \"x\" \"y\" \"z\"" "\\$\[0-9\]* = \"xyz\""