aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Burgess <andrew.burgess@embecosm.com>2021-03-17 09:39:06 +0000
committerAndrew Burgess <andrew.burgess@embecosm.com>2021-03-26 14:04:17 +0000
commit6b78370dcc18719d4a34d64ab759f30643d7b8d3 (patch)
treea26a7067a468403229174dd9b408d286f76eaed9
parentbaecbb3dc8314d2c91bfda38eedbcc2911397424 (diff)
downloadgdb-6b78370dcc18719d4a34d64ab759f30643d7b8d3.zip
gdb-6b78370dcc18719d4a34d64ab759f30643d7b8d3.tar.gz
gdb-6b78370dcc18719d4a34d64ab759f30643d7b8d3.tar.bz2
gdb/testsuite: resolve duplicate test name in gdb.cp/cplusfuncs.exp
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.
-rw-r--r--gdb/testsuite/ChangeLog5
-rw-r--r--gdb/testsuite/gdb.cp/cplusfuncs.exp2
2 files changed, 6 insertions, 1 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 8e60363..9301efe 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,5 +1,10 @@
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
variable number of spaces, this removes the duplicate testing of
'operator ->' which existed before.
diff --git a/gdb/testsuite/gdb.cp/cplusfuncs.exp b/gdb/testsuite/gdb.cp/cplusfuncs.exp
index 8e24db5..f1c2ff4 100644
--- a/gdb/testsuite/gdb.cp/cplusfuncs.exp
+++ b/gdb/testsuite/gdb.cp/cplusfuncs.exp
@@ -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)"