From 48d7ef85c0b7fb1bed0bceba753e82f63a842fd5 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Wed, 1 Jul 2026 17:44:26 -0300 Subject: sdl: main tweaks + tests --- tests.zig | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'tests.zig') diff --git a/tests.zig b/tests.zig index 0a81feb6..e0d982bd 100644 --- a/tests.zig +++ b/tests.zig @@ -611,4 +611,22 @@ pub fn main(init: std.process.Init) !void { try hs8.send("stty -icanon -echo min 1 time 0; printf '\\033[6n'; read -r -d R -t 3 _c && printf 'ZZCPR''OK\\n'; stty sane\r"); try hs8.expectWaitFor("ZZCPROK", 8000, "app blocked on its ESC[6n query — pardes dropped the reply (device queries not answered)"); } + + // 19. PRIMARY-DA TERMINATOR (helix regression). crossterm probes capabilities with + // `ESC[?u ESC[c` (kitty-keyboard query + primary DA) and waits on the DA reply + // `ESC[?...c` as the TERMINATOR of the whole probe. Answering ESC[6n alone (test + // 18) is not enough: without primary DA, helix enters its alt screen and then + // hangs on a BLANK pane. Send the real probe, read until the DA reply's 'c', + // and print the split marker only on success. + { + var hs9 = try Harness.init(gpa, exe.ptr, 24, 80); + defer hs9.deinit(); + try hs9.expectWaitFor("build.zig", 8000, "fresh terminal never auto-ls'd"); + try hs9.send("\x02"); // normal -> tty + try hs9.pump(600); + // read until 'c' (primary DA ends in 'c'); the kitty reply ESC[?0u has no 'c', + // so the read only completes once primary DA is answered. + try hs9.send("stty -icanon -echo min 1 time 0; printf '\\033[?u\\033[c'; read -r -d c -t 3 _r && printf 'ZZDA''OK\\n'; stty sane\r"); + try hs9.expectWaitFor("ZZDAOK", 8000, "app blocked on its ESC[c device-attributes probe — pardes never answered primary DA (helix hangs on a blank pane)"); + } } -- cgit v1.3