[gdb/testsuite] Remove superfluous 3rd argument from gdb_test call (3)
There's a pattern:
...
gdb_test <command> <pattern> <command>
...
that can be written shorter as:
...
gdb_test <command> <pattern>
...
Detect this pattern in proc gdb_test:
...
global gdb_prompt
upvar timeout timeout
if [llength $args]>2 then {
set message [lindex $args 2]
+ if { $message == [lindex $args 0] && [llength $args] == 3 } {
+ error "HERE"
+ }
} else {
set message [lindex $args 0]
}
...
and fix all occurrences in the testsuite/gdb.cp subdir.
Tested on x86_64-linux.
gdb/testsuite/ChangeLog:
2019-11-02 Tom de Vries <tdevries@suse.de>
* gdb.cp/anon-union.exp: Drop superfluous 3rd argument to gdb_test.
* gdb.cp/cpexprs.exp: Same.
* gdb.cp/except-multi-location.exp: Same.
* gdb.cp/exceptprint.exp: Same.
* gdb.cp/gdb2384.exp: Same.
* gdb.cp/inherit.exp: Same.
* gdb.cp/m-static.exp: Same.
* gdb.cp/meth-typedefs.exp: Same.
* gdb.cp/misc.exp: Same.
* gdb.cp/namespace.exp: Same.
* gdb.cp/non-trivial-retval.exp: Same.
* gdb.cp/overload.exp: Same.
* gdb.cp/pr17132.exp: Same.
* gdb.cp/re-set-overloaded.exp: Same.
* gdb.cp/rvalue-ref-types.exp: Same.
* gdb.cp/templates.exp: Same.
Change-Id: I0254d0cea71e7376aedb078166188a8010eeaebe
17 files changed: