diff options
| author | Gabriel Schneider <[email protected]> | 2026-07-01 17:44:26 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-08-01 15:02:07 -0300 |
| commit | 48d7ef85c0b7fb1bed0bceba753e82f63a842fd5 (patch) | |
| tree | 6c16465319c081c1205dc8a14f1e174cf114153c /tests.zig | |
| parent | 67763fbabfa873f506d4d2a498c08bf83e1fbac5 (diff) | |
| download | pardes-48d7ef85c0b7fb1bed0bceba753e82f63a842fd5.tar.gz pardes-48d7ef85c0b7fb1bed0bceba753e82f63a842fd5.zip | |
sdl: main tweaks + tests
Diffstat (limited to 'tests.zig')
| -rw-r--r-- | tests.zig | 18 |
1 files changed, 18 insertions, 0 deletions
@@ -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)"); + } } |
