[gdb/testsuite] Fix gdb.base/readline.exp with stub-termcap
authorTom de Vries <tdevries@suse.de>
Sat, 29 Apr 2023 08:47:46 +0000 (10:47 +0200)
committerTom de Vries <tdevries@suse.de>
Sat, 29 Apr 2023 08:47:46 +0000 (10:47 +0200)
commit8f29f8e1aef7e66ee73ba21857bd62cd66271307
treee004a6fe18cc4dfb8faff89dd348b8989ec1bcd6
parente0f4b3ec5f36ff90dbea21aab2190fb4565ca67b
[gdb/testsuite] Fix gdb.base/readline.exp with stub-termcap

When doing a build which uses stub-termcap, we run into:
...
(gdb) set width 7
<b) FAIL: gdb.base/readline.exp: set width 7 (timeout)
...

Since readline can't detect very basic terminal support, it falls back on
horizontal scrolling.

Fix this by detecting the horizontal scrolling case, and skipping the
subsequent test.

Tested on x86_64-linux.

PR testsuite/30400
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30400
gdb/testsuite/gdb.base/readline.exp