From 6570dc04d6343cbbf31c0eb2363f9bec817aa4db Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Wed, 1 Jul 2026 09:08:52 -0300 Subject: added yank and tty scrolling w keyboard --- tests.zig | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'tests.zig') diff --git a/tests.zig b/tests.zig index 1af5625d..1b4d6c24 100644 --- a/tests.zig +++ b/tests.zig @@ -210,6 +210,25 @@ pub fn main(init: std.process.Init) !void { try hs.send("\x02"); // tty -> normal (step 7 re-enters via Ctrl-b) try hs.pump(400); + // 6c. NORMAL-MODE MOTION SCROLLS THE TTY like a file pane: the pane is at the + // bottom (ZZFOLLOW visible). `gg` rides the cursor to the top of the + // scrollback and the viewport follows, so the bottom marker scrolls off; + // `G` rides it back down and the marker returns. + try hs.send("gg"); + try hs.pump(500); + try hs.expectNotContains("ZZFOLLOW", "normal-mode gg did not scroll the tty up off the bottom"); + try hs.send("G"); + try hs.pump(500); + try hs.expectContains("ZZFOLLOW", "normal-mode G did not scroll the tty back to the bottom"); + + // 6d. YANK MIRRORS TO THE SYSTEM CLIPBOARD (OSC 52): select the line with `x` + // and yank with `y`; the app writes an OSC 52 clipboard-copy to the host. + // (The paste direction needs a host that answers OSC 52 reads, which this + // emulator can't, so it isn't covered here.) + try hs.send("xy"); + try hs.pump(400); + try hs.expectRawContains("\x1b]52;c;", "yank did not emit an OSC 52 system-clipboard copy"); + // 7. Right-click a directory opens (acme "look") a terminal there and ls's // it. Make a dir with a unique entry, then `clear` and echo its path so the // path lands as contiguous output on body row 0. Right-click (no drag) on -- cgit v1.3