From d505017cec86c000f891b003f5ca3481f5ffae61 Mon Sep 17 00:00:00 2001 From: Berke Güzel Date: Mon, 12 Oct 2026 17:54:48 +0300 Subject: term: fix the two Kitty suite failures and run the suite by default Both failures were stale expectations in our copy of the suite. 8c2464c moved the terminal to xterm behavior and added spec tests for it. The Kitty bridge did not compile then, so nobody updated the suite. - A cursor report with a pending wrap gives the last column (1;5). Kitty gives the start of the next line. - HT only moves the cursor. Kitty writes a tab cell, which erases the text under the tab. REP after the tab then repeats nothing. The suite went weeks without running, because it needed -Dkitty_tests=true. Now every unsanitized Linux build runs it in the unit suite, and the main option only makes it mandatory. The README lists the deliberate differences from Kitty. Co-Authored-By: Claude Opus 5.5 --- tests/extern/kitty/parser.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'tests/extern/kitty/parser.py') diff --git a/tests/extern/kitty/parser.py b/tests/extern/kitty/parser.py index 537e1c0..76357fd 100644 --- a/tests/extern/kitty/parser.py +++ b/tests/extern/kitty/parser.py @@ -757,7 +757,9 @@ class TestParser(BaseTest): pb('12345', '12345') c.clear() pb('\033[6n', ('report_device_status', 6, 0)) - self.ae(c.wtcbuf, b'\033[2;1R') + # A pending wrap reports the last column, as xterm does. Kitty + # reports the start of the next line. + self.ae(c.wtcbuf, b'\033[1;5R') c.clear() s.cursor_key_mode = True pb('\033[?1$p', ('report_mode_status', 1, 1)) @@ -815,8 +817,9 @@ class TestParser(BaseTest): self.ae(str(s.line(0)), ' ') s.reset() pb('\t\033[b', ('screen_tab',), ('screen_repeat_character', 1)) - # The terminal includes blank tab padding in its line text. - self.ae(str(s.line(0)).rstrip(' '), '\t') + # HT only moves the cursor, as in xterm. Kitty writes a tab cell + # there. REP then has no graphic character to repeat. + self.ae(str(s.line(0)), '') self.ae(s.cursor.x, 7) self.ae(s.cursor.y, 0) s.reset() -- cgit v1.2.3