[0/6,gdb/tui] Introduce ansi-for-tui

Message ID 20230522131545.12291-1-tdevries@suse.de
Headers
Series Introduce ansi-for-tui |

Message

Tom de Vries May 22, 2023, 1:15 p.m. UTC
  For TUI testing, we'd like to use an xterm to replay scenario's that are
exercised in the testsuite, and vice versa create scenario's on an xterm and
be able to reproduce those in the testsuite.  In order to ensure identical
behaviour, we'd need identical TERM settings.

This series:
- introduces a new termcap entry ansi-for-tui that can be used with TUI in
  an xterm,
- adds the newline_glitch capability to ansiterm, and
- makes the TUI testsuite use ansi-for-tui.

Tested by re-running the TUI test-cases (gdb.tui/*.exp and gdb.python/tui*.exp)
on x86_64-linux.

Tom de Vries (6):
  [gdb/testsuite] Use TERM=dummy in gdb.tui/tuiterm.exp
  [gdb/testsuite] Factor out Term::_wrap_cursor
  [gdb/contrib] Add ansi-for-tui.sh
  [gdb/testsuite] Make ansi-for-tui available in with_tuiterm
  [gdb/testsuite] Implement the newline glitch in tuiterm
  [gdb/testsuite] Use ansi-for-tui in tuiterm

 gdb/contrib/ansi-for-tui.sh         |  66 +++++++++++++++
 gdb/testsuite/gdb.tui/tuiterm.exp   |  34 +++++++-
 gdb/testsuite/gdb.tui/wrap-line.exp |   4 +-
 gdb/testsuite/lib/gdb.exp           |  16 ++++
 gdb/testsuite/lib/tuiterm.exp       | 123 ++++++++++++++++++++++++++--
 5 files changed, 231 insertions(+), 12 deletions(-)
 create mode 100755 gdb/contrib/ansi-for-tui.sh


base-commit: 7b67409b99edca33b76961179286fb43a1714dd2