From: Andrew Burgess Date: Wed, 17 Mar 2021 09:39:06 +0000 (+0000) Subject: gdb/testsuite: resolve duplicate test name in gdb.cp/cplusfuncs.exp X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6b78370dcc18719d4a34d64ab759f30643d7b8d3;p=binutils-gdb.git 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. --- diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 8e603630c1e..9301efe9086 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2021-03-26 Andrew Burgess + + * gdb.cp/cplusfuncs.exp (test_paddr_operator_functions): Escape + square brackets in test. + 2021-03-26 Andrew Burgess * gdb.cp/maint.exp (test_first_component): Run more tests with a diff --git a/gdb/testsuite/gdb.cp/cplusfuncs.exp b/gdb/testsuite/gdb.cp/cplusfuncs.exp index 8e24db5db0d..f1c2ff4907f 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 " 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)"