Skip to content
Commit 250f1bba authored by Bernd Edlinger's avatar Bernd Edlinger Committed by Tom de Vries
Browse files

[gdb/testsuite] Fix gdb.tui/wrap-line.exp with wrapping disabled



There are a couple of ways that readline wrapping can be disabled:
- using "set horizontal-scroll-mode on" in INPUTRC,
- using a TERM setting like TERM=dumb, and
- building gdb with stub-termcap.

Using a trigger patch in default_gdb_init that adds
"set horizontal-scroll-mode on" to INPUTRC:
...
-    setenv INPUTRC [cached_file inputrc "set enable-bracketed-paste off"]
+    setenv INPUTRC [cached_file inputrc "set enable-bracketed-paste off\nset horizontal-scroll-mode on"]
...
we can easily reproduce a failure in gdb.tui/wrap-line.exp mentioned in
PR testsuite/31201 (which was reported for the stub-termcap case):
...
WARNING: timeout in accept_gdb_output
Screen Dump (size 50 columns x 24 rows, cursor at column 34, row 1):
    0 Quit
    1 <89012345678901234567890123456789W
    2
    ...
    23
FAIL: gdb.tui/wrap-line.exp: width-hard-coded: cli: wrap
...

Fix this by accepting the horizontal-scroll-mode style output.  We do
this only when in CLI mode though, when in TUI wrapping works as before
because it doesn't rely on readline.

Tested on x86_64-linux.

Co-Authored-By: default avatarTom de Vries <tdevries@suse.de>

Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=31201
parent 37ef6d97
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment