[gdb/testsuite] Fix unbalanced braces in gdb.tui/new-layout.exp
authorTom de Vries <tdevries@suse.de>
Wed, 16 Sep 2020 08:57:17 +0000 (10:57 +0200)
committerTom de Vries <tdevries@suse.de>
Wed, 16 Sep 2020 08:57:17 +0000 (10:57 +0200)
commit4d91ddd342b507a177fb84b73fdb6c0403323f79
tree6d9ce7be20e8d575d2415c10a735b682c23b7393
parentc1229f84a41a6aba5b7df1f4261a9336347b068a
[gdb/testsuite] Fix unbalanced braces in gdb.tui/new-layout.exp

On SLE-11 with tcl version 8.5, we run into:
...
UNRESOLVED: gdb.tui/new-layout.exp: testcase aborted due to \
  invalid command name: }
ERROR: Couldn't send tui new-layout example src 1} to GDB.
...

Apparently tcl 8.6 is more forgiving about unbalanced braces.

Expose the unbalanced braces on tcl 8.6 by temporarily wrapping the
test-case in:
...
proc do_this { args } {
    uplevel 1 {*}$args
}

do_this {
  ...
}
...
and escape them using a backslash.

Tested on x86_64-linux.

gdb/testsuite/ChangeLog:

2020-09-16  Tom de Vries  <tdevries@suse.de>

PR testsuite/26618
* gdb.tui/new-layout.exp: Escape unbalanced braces.
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.tui/new-layout.exp