]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
[gdb/testsuite] Initial TERM=ansis support in tuiterm
authorTom de Vries <tdevries@suse.de>
Fri, 8 Aug 2025 11:51:00 +0000 (13:51 +0200)
committerTom de Vries <tdevries@suse.de>
Fri, 8 Aug 2025 11:51:00 +0000 (13:51 +0200)
While investigating using TERM=ansiw for freebsd, I also came across
TERM=ansis which unlike ansiw is present on both linux and freebsd.

Add initial support for TERM=ansi in tuiterm:
- handle ansis in Term::_have_bw
- add Term::_csi_x to support (well, ignore) DECREQTPARM
  (Request Terminal Parameters)

This is sufficient to make the TUI testsuite pass on x86_64-freebsd.

gdb/testsuite/lib/tuiterm.exp

index 1e18a7aa9771e4d22a1ba2e333d622bb77746b4d..f4a87023e2c08f12038f6c749ec7e40b4ab6cc49 100644 (file)
@@ -92,7 +92,9 @@ namespace eval Term {
 
     # Return 1 if tuiterm has the bw/auto_left_margin enabled.
     proc _have_bw {} {
-       return [string equal $Term::_TERM "ansiw"]
+       return [expr \
+                   [string equal $Term::_TERM "ansiw"] \
+                   || [string equal $Term::_TERM "ansis"]]
     }
 
     # Backspace.
@@ -701,6 +703,14 @@ namespace eval Term {
        }
     }
 
+    # Request Terminal Parameters (DECREQTPARM)
+    #
+    # https://invisible-island.net/xterm/ctlseqs/ctlseqs.html
+    # https://vt100.net/docs/vt100-ug/chapter3.html
+    proc _csi_x {} {
+       # Ignore.
+    }
+
     # Insert string at the cursor location.
     proc _insert {str} {
        _log_cur "Inserted string '$str'" {