gdb/testsuite: resolve duplicate test name in gdb.cp/cplusfuncs.exp
authorAndrew Burgess <andrew.burgess@embecosm.com>
Wed, 17 Mar 2021 09:39:06 +0000 (09:39 +0000)
committerAndrew Burgess <andrew.burgess@embecosm.com>
Fri, 26 Mar 2021 14:04:17 +0000 (14:04 +0000)
While resolving duplicate test names I spotted that a test in
gdb.cp/cplusfuncs.exp included an unescaped '[]'.  In TCL square
brackets enclose expressions to evaluate, and so in this case, where
there is no enclosed expression, this just evaluates to the empty
string.

This clearly was not what the test intended, so in this commit I have
escaped the square brackets.  This has extended the test coverage.

gdb/testsuite/ChangeLog:

* gdb.cp/cplusfuncs.exp (test_paddr_operator_functions): Escape
square brackets in test.

gdb/testsuite/ChangeLog
gdb/testsuite/gdb.cp/cplusfuncs.exp

index 8e603630c1ecb2128544c4960589f67e9cb8748c..9301efe90867deba1028ad156fdffa3a29cb1873 100644 (file)
@@ -1,3 +1,8 @@
+2021-03-26  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+       * gdb.cp/cplusfuncs.exp (test_paddr_operator_functions): Escape
+       square brackets in test.
+
 2021-03-26  Andrew Burgess  <andrew.burgess@embecosm.com>
 
        * gdb.cp/maint.exp (test_first_component): Run more tests with a
index 8e24db5db0d123ac95b57c4d08783d5dadded989..f1c2ff4907fd530cd7045fc2166e3f0fb7c06ced 100644 (file)
@@ -497,7 +497,7 @@ proc test_paddr_operator_functions {} {
        " = .* $hex <foo::operator new\\\[\\\]\\(.*\\)(| static)>"    
 
     print_addr "foo::operator delete($dm_type_void_star)"
-    print_addr "foo::operator delete[]($dm_type_void_star)"
+    print_addr "foo::operator delete\[\]($dm_type_void_star)"
 
     print_addr "foo::operator int($dm_type_void)"
     print_addr "foo::operator $dm_operator_char_star\($dm_type_void)"
This page took 0.046334 seconds and 4 git commands to generate.