gdb/testsuite: extend gdb.tui/tui-layout.exp test script
In passing I noticed that the gdb.tui/tui-layout.exp test script was a
little strange, it tests the layout command multiple times, but never
sets up our ANSI terminal emulator, so every layout command fails with
a message about the terminal lacking the required abilities.
It turns out that this was caused by this commit:
commit
9162a27c5f5828240b53379d735679e2a69a9f41
Date: Tue Nov 13 11:59:03 2018 -0700
Change gdb test suite's TERM setting
This was when we changed the testsuite to set the TERM environment
variable to "dumb" by default.
After this, any tui test that didn't set the terminal mode back to
'ansi' would fail to activate tui mode.
For the tui-layout.exp test it just so happens that the test patterns
are generic enough that the test continued to pass, even after this
change.
In this commit I have updated the test so we now check the layout
command both with a 'dumb' terminal and with the 'ansi' terminal.
When testing with the 'ansi' terminal, I have some limited validation
that GDB correctly entered tui mode.
I figured that it is probably worth having at least one test in the
test suite that deliberately tries to enter tui mode in a dumb
terminal, it would be sad if we one day managed to break GDB such that
this caused a crash, and never noticed.