This commit was manufactured by cvs2svn to create branch 'gdb_7_0-branch'.
[external/binutils.git] / gdb / testsuite / gdb.base / exprs.exp
index 1a6b472..711c72e 100644 (file)
@@ -1,5 +1,5 @@
 #   Copyright 1988, 1990, 1991, 1992, 1994, 1995, 1996, 1997, 1998, 2000,
-#   2001, 2003, 2007 Free Software Foundation, Inc.
+#   2001, 2003, 2007, 2008, 2009 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -14,9 +14,6 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
 # This file was written by Rob Savoye. (rob@cygnus.com)
 
 if $tracelevel {
@@ -251,3 +248,14 @@ 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\""
+
+# Enum formatting tests.
+test_expr "print red" "\\$\[0-9\]* = red"
+gdb_test "set output-radix 8" ""
+test_expr "print red" "\\$\[0-9\]* = red"
+test_expr "print/d red" "\\$\[0-9\]* = 0"
+gdb_test "set output-radix 10" ""