summaryrefslogtreecommitdiff
path: root/test/process
diff options
context:
space:
mode:
Diffstat (limited to 'test/process')
-rw-r--r--test/process/tty_boot.zig144
-rw-r--r--test/process/tty_editing.zig399
-rw-r--r--test/process/tty_images.zig11
-rw-r--r--test/process/tty_layout.zig88
-rw-r--r--test/process/tty_terminals.zig60
-rw-r--r--test/process/tty_themes.zig177
6 files changed, 507 insertions, 372 deletions
diff --git a/test/process/tty_boot.zig b/test/process/tty_boot.zig
index 2680a499..2a4fea00 100644
--- a/test/process/tty_boot.zig
+++ b/test/process/tty_boot.zig
@@ -45,7 +45,7 @@ fn argv(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
try t.stable(700, 10000);
try t.snap("noargs");
try t.start(31, 100, &.{"notes.txt:3"});
- try t.wait(8000, "Newcol Joincol");
+ try t.wait(8000, "Newcol Help Exit");
try t.wait(8000, "line 3");
try t.stable(700, 20000);
try t.snap("filearg");
@@ -53,14 +53,14 @@ fn argv(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
// `-n 3` boots the very same single pane (it always did — the file arm never
// looked at the count; before this it merely also stapled a shell to the right)
try t.start(31, 100, &.{ "-n", "3", "notes.txt" });
- try t.wait(8000, "Newcol Joincol");
+ try t.wait(8000, "Newcol Help Exit");
try t.wait(8000, "line 1");
try t.stable(700, 20000);
try t.snap("filearg-n3");
try t.dir("sub");
try t.file("sub/inside.txt", "marker");
try t.start(31, 100, &.{"sub"});
- try t.wait(8000, "Newcol Joincol");
+ try t.wait(8000, "Newcol Help Exit");
try t.wait(8000, "inside.txt");
try t.stable(700, 20000);
try t.snap("dirarg");
@@ -77,14 +77,14 @@ fn badutf(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
try t.file("bad.txt", "hello \xff\xfe world\nlatin-1 caf\xe9 tail\ntruncated \xe6\x97 here\nend\n");
try t.file("wide.txt", "日本語 日本語 日本語 日本語 日本語 日本語 日本語 tail\nsecond line\n");
try t.start(31, 100, &.{"bad.txt"});
- try t.wait(8000, "Newcol Joincol");
+ try t.wait(8000, "Newcol Help Exit");
try t.stable(700, 20000);
try t.snap("badbytes");
// 50 columns, not 100: a FILE boots alone and fills the window, and at 100 the
// whole line fits, so `$` scrolls nowhere. This is
// the width the left column used to be, i.e. the pane this case was written for
try t.start(31, 50, &.{"wide.txt"});
- try t.wait(8000, "Newcol Joincol");
+ try t.wait(8000, "Newcol Help Exit");
try t.stable(700, 20000);
// SPC t w turns soft wrap OFF: hscroll is the other half of this case and a
// wrapped body has nothing to scroll sideways. The unwrapped view must keep the
@@ -103,7 +103,7 @@ fn boot(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
defer t.deinit();
try t.file("hello.txt", "marker-content");
try t.start(31, 100, &.{ "-n", "1" });
- try t.wait(8000, "Newcol Joincol");
+ try t.wait(8000, "Newcol Help Exit");
try t.wait(8000, "hello.txt");
try t.stable(700, 20000);
try t.snap("boot");
@@ -144,20 +144,20 @@ fn builtins(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
try t.key("space j n space j n space j n");
try t.wait(10000, "Look enter, right-click");
try t.wait(10000, "Look at its argument as B3 does");
- try sweepHelp(&t, "@Help#1", 4);
+ try sweepHelp(&t, "@Help#1", 3);
try t.wait(10000, "under SPC c");
try t.wait(10000, "Joincol");
try t.stable(700, 15000);
try t.snap("column-group");
- try sweepHelp(&t, "@Help#2", 4);
+ try sweepHelp(&t, "@Help#2", 3);
try t.wait(10000, "Tutor");
try t.stable(700, 15000);
try t.snap("docs-group");
// Tutor's row, under the documentation of the four before it (Keys,
// describe-key, is SPC h k; Messages' runs to three rows)
- try t.press("middle", "@Tutor", 32);
- try t.release("middle", "@Tutor", 32);
+ try t.press("middle", "@Tutor", 31);
+ try t.release("middle", "@Tutor", 31);
try t.wait(10000, "PARDES TUTOR");
try t.stable(700, 15000);
try t.snap("tutor-from-index");
@@ -182,6 +182,14 @@ fn dump(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
try t.key("esc");
try t.settle(100);
try t.stable(400, 5000);
+ // Dump left the window row (UX K'4): typed into its own text, after its
+ // words (A appends at the line's end), and run there by B2
+ try t.press("left", "@Find", 1);
+ try t.release("left", "@Find", 1);
+ try t.key("A");
+ try t.send("Dump");
+ try t.key("esc");
+ try t.settle(100);
try t.press("middle", "@Dump", 1);
try t.release("middle", "@Dump", 1);
try t.stable(600, 8000);
@@ -213,6 +221,14 @@ fn load(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
try t.wheel("up", "10", 8);
try t.wheel("up", "10", 8);
try t.stable(500, 8000);
+ // Dump left the window row (UX K'4): typed into its own text, after its
+ // words (A appends at the line's end), and run there by B2
+ try t.press("left", "@Find", 1);
+ try t.release("left", "@Find", 1);
+ try t.key("A");
+ try t.send("Dump");
+ try t.key("esc");
+ try t.settle(100);
try t.press("middle", "@Dump", 1);
try t.release("middle", "@Dump", 1);
try t.stable(600, 8000);
@@ -233,7 +249,7 @@ fn restore(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
defer t.deinit();
t.privateDaemon();
try t.start(31, 100, &.{ "-n", "1" });
- try t.wait(8000, "Newcol Joincol");
+ try t.wait(8000, "Newcol Help Exit");
try t.stable(700, 20000);
try t.key("c-b");
try t.stable(600, 8000);
@@ -241,6 +257,14 @@ fn restore(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
try t.key("enter");
try t.wait(8000, "KEEPME");
try t.stable(700, 10000);
+ // Dump left the window row (UX K'4): typed into its own text, after its
+ // words (A appends at the line's end), and run there by B2
+ try t.press("left", "@Find", 1);
+ try t.release("left", "@Find", 1);
+ try t.key("A");
+ try t.send("Dump");
+ try t.key("esc");
+ try t.settle(100);
try t.press("middle", "@Dump", 1);
try t.release("middle", "@Dump", 1);
try t.stable(700, 10000);
@@ -288,10 +312,11 @@ fn headersweep(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
try t.wait(8000, "EPT-COL) exit 0");
try t.stable(700, 15000);
try t.snap("col-swept");
- // the workspace tag, the same
- try t.press("left", "110", 1);
- try t.release("left", "110", 1);
- try t.key("i");
+ // the workspace tag, the same: its own text after its words (UX K'1;
+ // A appends at the line's end)
+ try t.press("left", "@Find", 1);
+ try t.release("left", "@Find", 1);
+ try t.key("A");
try t.key("space");
try t.send("echo SW''EPT-WS");
try t.key("esc");
@@ -304,9 +329,9 @@ fn headersweep(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
try t.snap("ws-swept");
// a right sweep over part of a word looks for the part: `hay.txt` opens,
// where a click would look for all of `xxhay.txtxx`
- try t.press("left", "118", 1);
- try t.release("left", "118", 1);
- try t.key("i");
+ try t.press("left", "@Find", 1);
+ try t.release("left", "@Find", 1);
+ try t.key("A");
try t.key("space");
try t.send("xxhay.txtxx");
try t.key("esc");
@@ -327,9 +352,9 @@ fn headersweep(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
try t.snap("cancelled");
// for comparison, a select sweep over the second column's tag selects, in
// the tag's selection colours, and runs nothing
- try t.press("left", "@Find#2", 2);
- try t.drag("left", "@Grep#2+4", 2);
- try t.release("left", "@Grep#2+4", 2);
+ try t.press("left", "@New#2", 2);
+ try t.drag("left", "@Term#2+4", 2);
+ try t.release("left", "@Term#2+4", 2);
try t.stable(700, 15000);
try t.style("selected");
try t.done();
@@ -345,6 +370,14 @@ fn headersweep_restored(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
try t.start(21, 120, &.{ "-n", "3" });
try t.wait(8000, "Newcol");
try t.stable(700, 20000);
+ // Dump left the window row (UX K'4): typed into its own text, after its
+ // words (A appends at the line's end), and run there by B2
+ try t.press("left", "@Find", 1);
+ try t.release("left", "@Find", 1);
+ try t.key("A");
+ try t.send("Dump");
+ try t.key("esc");
+ try t.settle(100);
try t.press("middle", "@Dump", 1);
try t.release("middle", "@Dump", 1);
try t.stable(700, 10000);
@@ -367,9 +400,9 @@ fn headersweep_restored(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
try t.wait(8000, "-COL) exit 0");
try t.stable(700, 15000);
try t.snap("col-swept");
- try t.press("left", "118", 1);
- try t.release("left", "118", 1);
- try t.key("i");
+ try t.press("left", "@Find", 1);
+ try t.release("left", "@Find", 1);
+ try t.key("A");
try t.key("space");
try t.send("echo RE''STORED-WS");
try t.key("esc");
@@ -397,7 +430,7 @@ fn logquiet(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
var t = try Tty.init(gpa, exe, "logquiet");
defer t.deinit();
try t.start(31, 100, &.{ "-n", "1" });
- try t.wait(8000, "Newcol Joincol");
+ try t.wait(8000, "Newcol Help Exit");
try t.stable(700, 20000);
try t.key("c-b");
try t.stable(600, 8000);
@@ -413,8 +446,16 @@ fn tutor(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
var t = try Tty.init(gpa, exe, "tutor");
defer t.deinit();
try t.start(31, 150, &.{ "-n", "3" });
- try t.wait(8000, "Newcol Joincol");
+ try t.wait(8000, "Newcol Help Exit");
try t.stable(700, 20000);
+ // Tutor left the window row (UX K'4): typed into its own text, after its
+ // words (A appends at the line's end), and run there by B2
+ try t.press("left", "@Find", 1);
+ try t.release("left", "@Find", 1);
+ try t.key("A");
+ try t.send("Tutor");
+ try t.key("esc");
+ try t.settle(100);
try t.press("middle", "@Tutor", 1);
try t.release("middle", "@Tutor", 1);
try t.stable(700, 15000);
@@ -446,6 +487,15 @@ fn topbarexec(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
try t.start(21, 90, &.{ "-n", "3" });
try t.wait(8000, "zmarkfile.txt");
try t.stable(700, 20000);
+ // Debug left the window row (UX K'4): typed into its own text, after its
+ // words (A appends at the line's end), and run there by B2
+ try t.press("left", "@Find", 1);
+ try t.release("left", "@Find", 1);
+ try t.key("A");
+ try t.send("Debug");
+ try t.key("esc");
+ try t.settle(100);
+ try t.stable(400, 8000);
// sweep `zmarkfile.txt` out of the shell's own greeting: an ordinary left drag,
// and the kind of stale highlight that is simply lying around in real use
try t.press("left", "3", 6);
@@ -482,7 +532,7 @@ fn leader(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
// §4.5): the +Help index for a group is the word's, `Help h` swept here.
try t.file("cmds.txt", "Help Help h Help t Help c Help l");
try t.start(41, 100, &.{"cmds.txt"});
- try t.wait(8000, "Newcol Joincol");
+ try t.wait(8000, "Newcol Help Exit");
try t.wait(8000, "cmds.txt");
try t.stable(700, 20000);
@@ -510,11 +560,11 @@ fn leader(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
try t.stable(400, 5000);
// Executing Help as text opens the full index, not a filtered group.
- try t.press("middle", "@Help", 4);
- try t.release("middle", "@Help", 4);
+ try t.press("middle", "@Help", 3);
+ try t.release("middle", "@Help", 3);
try t.wait(10000, "pardes builtins: each one's keys and its name");
try t.wait(10000, "ClipPasteBefore");
- try sweepHelp(&t, "@Help#2", 4);
+ try sweepHelp(&t, "@Help#2", 3);
try t.wait(10000, "under SPC h");
try t.stable(700, 15000);
try t.snap("help-group");
@@ -534,24 +584,24 @@ fn leader(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
try t.key("space d");
try t.stable(700, 15000);
- try t.press("middle", "@Help", 4);
- try t.release("middle", "@Help", 4);
+ try t.press("middle", "@Help", 3);
+ try t.release("middle", "@Help", 3);
try t.wait(10000, "pardes builtins: each one's keys and its name");
try t.wait(10000, "ClipPasteBefore");
// PDF commands depend on the build; these toggles do not.
- try sweepHelp(&t, "@Help#3", 4);
+ try sweepHelp(&t, "@Help#3", 3);
try t.wait(10000, "under SPC t");
// its first rows: each word's documentation under it, the rest below
try t.wait(10000, "SPC t a Ascii");
try t.wait(10000, "SPC t c Changes");
// SPC w is Window itself now, not a group; the column group stands in
- try sweepHelp(&t, "@Help#4", 4);
+ try sweepHelp(&t, "@Help#4", 3);
try t.wait(10000, "under SPC c");
try t.wait(10000, "Joincol");
try t.stable(700, 15000);
try t.snap("help-column");
- try sweepHelp(&t, "@Help#5", 4);
+ try sweepHelp(&t, "@Help#5", 3);
try t.wait(10000, "WsDiagnostics");
try t.stable(700, 15000);
try t.snap("help-language");
@@ -579,8 +629,8 @@ fn mini(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
try t.start(23, 90, &.{"commands.txt"});
try t.wait(8000, "Mini demo.zig");
try t.stable(400, 10000);
- try t.press("middle", "@Mini", 4);
- try t.release("middle", "@Mini", 4);
+ try t.press("middle", "@Mini", 3);
+ try t.release("middle", "@Mini", 3);
try t.wait(8000, "/Mini demo.zig");
try t.stable(500, 10000);
try t.snap("opened");
@@ -754,7 +804,7 @@ fn msg(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
defer t.deinit();
try t.lines("a.txt", 6, "");
try t.start(15, 70, &.{"a.txt"});
- try t.wait(8000, "Newcol Joincol");
+ try t.wait(8000, "Newcol Help Exit");
try t.wait(8000, "a.txt");
try t.stable(700, 20000);
try t.snap("opened");
@@ -885,7 +935,7 @@ fn savepane(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
var t = try Tty.init(gpa, exe, "savepane");
defer t.deinit();
try t.start(31, 100, &.{ "-n", "1" });
- try t.wait(8000, "Newcol Joincol");
+ try t.wait(8000, "Newcol Help Exit");
try t.stable(700, 20000);
// a scratch of our own, with something in it to save
try t.key("space f n");
@@ -944,26 +994,26 @@ fn filewatch(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
try t.wait(8000, "w.txt");
try t.stable(700, 20000);
// open w.txt as a file pane: type the name into the shell, right-click it
- try t.press("left", "5", 9);
- try t.release("left", "5", 9);
+ try t.press("left", "5", 8);
+ try t.release("left", "5", 8);
try t.stable(400, 5000);
try t.key("i");
try t.send("w.txt");
try t.key("esc");
try t.settle(100);
- try t.press("right", "6", 9);
- try t.release("right", "6", 9);
+ try t.press("right", "6", 8);
+ try t.release("right", "6", 8);
try t.wait(10000, "line 4");
try t.stable(700, 15000);
// ...and open sub/s.txt from the path sitting on line 3 of that pane, so the
// second watched pane is in a DIFFERENT directory from the first
- try t.press("right", "20", 10);
- try t.release("right", "20", 10);
+ try t.press("right", "20", 9);
+ try t.release("right", "20", 9);
try t.wait(10000, "line 8");
try t.stable(700, 15000);
// an UNSAVED edit on line 1 of w.txt
- try t.press("left", "10", 8);
- try t.release("left", "10", 8);
+ try t.press("left", "10", 7);
+ try t.release("left", "10", 7);
try t.stable(400, 5000);
try t.key("i");
try t.send("MYEDIT");
diff --git a/test/process/tty_editing.zig b/test/process/tty_editing.zig
index a5d58906..862897e7 100644
--- a/test/process/tty_editing.zig
+++ b/test/process/tty_editing.zig
@@ -300,12 +300,12 @@ fn yankpaste(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
defer t.deinit();
try t.lines("f.txt", 5, "");
try t.start(31, 100, &.{"f.txt"});
- try t.wait(8000, "Newcol Joincol");
+ try t.wait(8000, "Newcol Help Exit");
try t.wait(8000, "line 5");
try t.stable(700, 20000);
// linewise: x-select line 2, yank, move down, paste below line 3
- try t.press("left", "8", 5);
- try t.release("left", "8", 5);
+ try t.press("left", "8", 4);
+ try t.release("left", "8", 4);
try t.stable(400, 5000);
try t.key("x y j p");
try t.stable(400, 5000);
@@ -315,8 +315,8 @@ fn yankpaste(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
try t.stable(400, 5000);
try t.snap("linewise-above");
// charwise: v-select two chars of line 1, yank, paste splices after them
- try t.press("left", "8", 4);
- try t.release("left", "8", 4);
+ try t.press("left", "8", 3);
+ try t.release("left", "8", 3);
try t.stable(400, 5000);
try t.key("v l y p");
try t.stable(400, 5000);
@@ -392,42 +392,42 @@ fn chordcut(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
try t.stable(700, 15000);
try t.snap("opened");
// 1-2 Cut: left-drag over "line" on line 2, tap middle while holding
- try t.press("left", "8", 10);
- try t.drag("left", "11", 10);
- try t.press("middle", "11", 10);
- try t.release("middle", "11", 10);
- try t.release("left", "11", 10);
+ try t.press("left", "8", 8);
+ try t.drag("left", "11", 8);
+ try t.press("middle", "11", 8);
+ try t.release("middle", "11", 8);
+ try t.release("left", "11", 8);
try t.stable(400, 5000);
try t.snap("cut");
// 1-2 then 1-3 in one hold = copy: line 3 keeps its text, register loaded
- try t.press("left", "8", 11);
- try t.drag("left", "11", 11);
- try t.press("middle", "11", 11);
- try t.release("middle", "11", 11);
- try t.press("right", "11", 11);
- try t.release("right", "11", 11);
- try t.release("left", "11", 11);
+ try t.press("left", "8", 9);
+ try t.drag("left", "11", 9);
+ try t.press("middle", "11", 9);
+ try t.release("middle", "11", 9);
+ try t.press("right", "11", 9);
+ try t.release("right", "11", 9);
+ try t.release("left", "11", 9);
try t.stable(400, 5000);
try t.snap("copied");
// 1-3 at a bare click point: hold left past the end of line 4, tap right —
// the register splices in at the click
- try t.press("left", "14", 12);
- try t.press("right", "14", 12);
- try t.release("right", "14", 12);
- try t.release("left", "14", 12);
+ try t.press("left", "14", 10);
+ try t.press("right", "14", 10);
+ try t.release("right", "14", 10);
+ try t.release("left", "14", 10);
try t.stable(400, 5000);
try t.snap("pointpaste");
// 1-3 over a fresh selection replaces it with the register
- try t.press("left", "9", 13);
- try t.drag("left", "11", 13);
- try t.press("right", "11", 13);
- try t.release("right", "11", 13);
- try t.release("left", "11", 13);
+ try t.press("left", "9", 11);
+ try t.drag("left", "11", 11);
+ try t.press("right", "11", 11);
+ try t.release("right", "11", 11);
+ try t.release("left", "11", 11);
try t.stable(400, 5000);
try t.snap("replaced");
// arm the cancel tests: append `echo B''OO g.txt` to line 2
- try t.press("left", "10", 10);
- try t.release("left", "10", 10);
+ try t.press("left", "10", 8);
+ try t.release("left", "10", 8);
try t.stable(400, 5000);
try t.key("i");
try t.send("echo B''OO g.txt");
@@ -436,56 +436,56 @@ fn chordcut(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
try t.stable(400, 5000);
// 2-3 cancel (acme textselect2): tap right during the middle execute-drag
// over `echo B''OO` — the command never runs (no BOO anywhere)
- try t.press("middle", "10", 10);
- try t.drag("middle", "19", 10);
- try t.press("right", "19", 10);
- try t.release("right", "19", 10);
- try t.release("middle", "19", 10);
+ try t.press("middle", "10", 8);
+ try t.drag("middle", "19", 8);
+ try t.press("right", "19", 8);
+ try t.release("right", "19", 8);
+ try t.release("middle", "19", 8);
try t.stable(700, 8000);
try t.snap("cancelexec");
// the same drag released clean proves the word was live: BOO appears
- try t.press("middle", "10", 10);
- try t.drag("middle", "19", 10);
- try t.release("middle", "19", 10);
+ try t.press("middle", "10", 8);
+ try t.drag("middle", "19", 8);
+ try t.release("middle", "19", 8);
try t.wait(10000, "BOO");
try t.stable(700, 10000);
try t.snap("execafter");
// 3-1 cancel (acme textselect3): tap left during the right look-drag over
// g.txt — no pane opens
- try t.press("right", "21", 10);
- try t.drag("right", "25", 10);
- try t.press("left", "25", 10);
- try t.release("left", "25", 10);
- try t.release("right", "25", 10);
+ try t.press("right", "21", 8);
+ try t.drag("right", "25", 8);
+ try t.press("left", "25", 8);
+ try t.release("left", "25", 8);
+ try t.release("right", "25", 8);
try t.stable(700, 8000);
try t.snap("cancellook");
// the same look released clean opens g.txt
- try t.press("right", "21", 10);
- try t.drag("right", "25", 10);
- try t.release("right", "25", 10);
+ try t.press("right", "21", 8);
+ try t.drag("right", "25", 8);
+ try t.release("right", "25", 8);
try t.wait(10000, "line 2");
try t.stable(700, 10000);
try t.snap("lookafter");
// a fresh left click dismisses the chord's leftover selection instead of
// dragging the anchored span to the click: copy `line` on g.txt line 1
// (styled snap shows the selection), then click the next row (it's gone)
- try t.press("left", "8", 24);
- try t.drag("left", "11", 24);
- try t.press("middle", "11", 24);
- try t.release("middle", "11", 24);
- try t.press("right", "11", 24);
- try t.release("right", "11", 24);
- try t.release("left", "11", 24);
+ try t.press("left", "8", 23);
+ try t.drag("left", "11", 23);
+ try t.press("middle", "11", 23);
+ try t.release("middle", "11", 23);
+ try t.press("right", "11", 23);
+ try t.release("right", "11", 23);
+ try t.release("left", "11", 23);
try t.stable(400, 5000);
try t.style("chordsel");
- try t.press("left", "8", 25);
- try t.release("left", "8", 25);
+ try t.press("left", "8", 24);
+ try t.release("left", "8", 24);
try t.stable(400, 5000);
try t.style("clickdismiss");
// g.txt opened under the lower shell's text and left it three rows: close it,
// and the shell grows back into its rows, for what follows to run in
- try t.press("middle", "59", 23);
- try t.release("middle", "59", 23);
+ try t.press("middle", "@Del", 22);
+ try t.release("middle", "@Del", 22);
try t.stable(700, 15000);
// tty paste chord: over a mouse-listening app B1 is the app's, so the
// chord's B1 holds Shift (B3 is pardes's either way); the app gets a click
@@ -554,31 +554,31 @@ fn selarg(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
try t.key("c-b");
try t.stable(600, 8000);
// keep a left selection over ZZARG in pane A (this also focuses A)
- try t.press("left", "3", 5);
- try t.drag("left", "7", 5);
- try t.release("left", "7", 5);
+ try t.press("left", "3", 4);
+ try t.drag("left", "7", 4);
+ try t.release("left", "7", 4);
try t.stable(400, 5000);
try t.snap("kept");
// chord in pane B: middle on ./c.sh + left tap (B has NO selection: the
// argument comes from pane A's kept left selection) + middle release runs
- try t.press("middle", "55", 5);
- try t.press("left", "55", 5);
- try t.release("middle", "55", 5);
- try t.release("left", "55", 5);
+ try t.press("middle", "55", 4);
+ try t.press("left", "55", 4);
+ try t.release("middle", "55", 4);
+ try t.release("left", "55", 4);
try t.wait(10000, "CHORDARG:ZZARG");
try t.stable(700, 10000);
try t.snap("crosspane");
// now an explicit modal selection: plain-click ZZVEE in A (drops A's kept
// left selection), select it with v e, chord in B again
- try t.press("left", "9", 5);
- try t.release("left", "9", 5);
+ try t.press("left", "9", 4);
+ try t.release("left", "9", 4);
try t.stable(400, 5000);
try t.send("ve");
try t.stable(400, 5000);
- try t.press("middle", "55", 5);
- try t.press("left", "55", 5);
- try t.release("middle", "55", 5);
- try t.release("left", "55", 5);
+ try t.press("middle", "55", 4);
+ try t.press("left", "55", 4);
+ try t.release("middle", "55", 4);
+ try t.release("left", "55", 4);
try t.wait(10000, "CHORDARG:ZZVEE");
try t.stable(700, 10000);
try t.snap("vselarg");
@@ -637,8 +637,8 @@ fn find(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
try t.stable(700, 15000);
try t.snap("promoted");
// a second Find from here.txt reuses its query pane; nothing found is 0
- try t.press("left", "8", 4);
- try t.release("left", "8", 4);
+ try t.press("left", "8", 3);
+ try t.release("left", "8", 3);
try t.stable(400, 5000);
try t.key("space");
try t.key("f");
@@ -653,9 +653,9 @@ fn find(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
try t.snap("cancel");
// B2 on Find with `zqm` selected in here.txt: the query pane under it, the
// keyboard still in here.txt
- try t.press("left", "13", 4);
- try t.drag("left", "15", 4);
- try t.release("left", "15", 4);
+ try t.press("left", "13", 3);
+ try t.drag("left", "15", 3);
+ try t.release("left", "15", 3);
try t.stable(400, 5000);
try t.press("middle", "@Find", 1);
try t.release("middle", "@Find", 1);
@@ -1061,14 +1061,14 @@ fn lookpanes(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
try t.stable(400, 5000);
// an ordinary dir look on the shell's own ls output: alpha's directory pane,
// split below it, which takes the keyboard
- try t.press("right", "@alpha", 6);
- try t.release("right", "@alpha", 6);
+ try t.press("right", "@alpha", 5);
+ try t.release("right", "@alpha", 5);
try t.wait(10000, "amark.txt");
try t.stable(700, 20000);
// type the words to look into what is left of the workdir shell (past its own
// ls output, on the same row: its last row is the resize handle)
- try t.press("left", "95", 5);
- try t.release("left", "95", 5);
+ try t.press("left", "95", 4);
+ try t.release("left", "95", 4);
try t.stable(400, 5000);
try t.key("i");
try t.send("zqonly.txt pick.txt twin.txt");
@@ -1077,42 +1077,42 @@ fn lookpanes(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
try t.stable(400, 5000);
try t.snap("shells");
// make the beta pane the most recently focused, so the walk has to pass it
- try t.press("left", "10", 5);
- try t.release("left", "10", 5);
+ try t.press("left", "10", 4);
+ try t.release("left", "10", 4);
try t.stable(700, 10000);
// zqonly.txt is only under alpha: the clicked shell's cwd fails, beta fails,
// alpha's directory pane answers. Before, this word became a search.
- try t.press("right", "@zqonly.txt", 5);
- try t.release("right", "@zqonly.txt", 5);
+ try t.press("right", "@zqonly.txt", 4);
+ try t.release("right", "@zqonly.txt", 4);
try t.wait(10000, "ONLY-IN-ALPHA");
try t.stable(700, 20000);
try t.snap("other-dir");
// both.txt is in BOTH dirs and alpha is now the most recent (its file pane
// just opened), but the CLICK still wins: looked inside the beta pane it
// opens beta's copy
- try t.press("right", "10", 5);
- try t.release("right", "10", 5);
+ try t.press("right", "10", 4);
+ try t.release("right", "10", 4);
try t.wait(10000, "BOTH-FROM-BETA");
try t.stable(700, 20000);
try t.snap("clicked-wins");
// from a pane whose own dir holds neither copy the access order decides:
// focus alpha's directory pane (a click on its first row), look pick.txt (in
// both dirs) from the workdir shell -> alpha's
- try t.press("left", "@amark.txt", 9);
- try t.release("left", "@amark.txt", 9);
+ try t.press("left", "@amark.txt", 8);
+ try t.release("left", "@amark.txt", 8);
try t.stable(700, 10000);
- try t.press("right", "@pick.txt", 5);
- try t.release("right", "@pick.txt", 5);
+ try t.press("right", "@pick.txt", 4);
+ try t.release("right", "@pick.txt", 4);
try t.wait(10000, "PICK-FROM-ALPHA");
try t.stable(700, 20000);
try t.snap("mru-alpha");
// focus the beta pane instead and the same look flips: twin.txt is in both
// dirs, beta is most recent, beta's copy opens
- try t.press("left", "10", 5);
- try t.release("left", "10", 5);
+ try t.press("left", "10", 4);
+ try t.release("left", "10", 4);
try t.stable(700, 10000);
- try t.press("right", "@twin.txt", 5);
- try t.release("right", "@twin.txt", 5);
+ try t.press("right", "@twin.txt", 4);
+ try t.release("right", "@twin.txt", 4);
try t.wait(10000, "TWIN-FROM-BETA");
try t.stable(700, 20000);
try t.snap("mru-beta");
@@ -1151,30 +1151,30 @@ fn lookrange(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
try t.snap("opened");
// --- form 1: whole lines. r.txt opens BELOW look.txt (an ordinary look) with
// lines 3, 4 and 5 selected whole, terminators included — helix's own `x`.
- try t.press("right", "10", 4);
- try t.release("right", "10", 4);
+ try t.press("right", "10", 3);
+ try t.release("right", "10", 3);
try t.wait(10000, "cccc dccc");
try t.stable(700, 15000);
try t.snap("wholelines");
try t.style("wholelines");
// --- form 2: one line, a column span. r.txt is open now, so this re-uses that
// pane (focusPaneByPath) — the same route a `/` result row takes.
- try t.press("right", "12", 5);
- try t.release("right", "12", 5);
+ try t.press("right", "12", 4);
+ try t.release("right", "12", 4);
try t.stable(700, 15000);
try t.snap("onelinespan");
try t.style("onelinespan");
// --- form 3: the general one, across both lines and columns
- try t.press("right", "12", 6);
- try t.release("right", "12", 6);
+ try t.press("right", "12", 5);
+ try t.release("right", "12", 5);
try t.stable(700, 15000);
try t.snap("fullspan");
try t.style("fullspan");
// --- a STALE range: line 99 of a nine-line file, which is what a result row
// looks like once the file has changed underneath it. It must CLAMP — no crash,
// no garbage highlight — landing on the last cell that really exists.
- try t.press("right", "12", 7);
- try t.release("right", "12", 7);
+ try t.press("right", "12", 6);
+ try t.release("right", "12", 6);
try t.stable(700, 15000);
try t.snap("stale");
try t.style("stale");
@@ -1358,29 +1358,29 @@ fn cmdword(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
// verbs are what is under test here, not the announcement.
try t.config("Verbose off");
try t.start(31, 120, &.{"cmds.txt"});
- try t.wait(8000, "Newcol Joincol");
+ try t.wait(8000, "Newcol Help Exit");
try t.wait(8000, "cmds.txt");
try t.stable(700, 20000);
try t.snap("opened");
// a single middle CLICK inside the run (col 11 is inside `echo`) expands to the
// whole `@`echo ZZ''E`` and runs it as a command pane; focus stays on the file
- try t.press("middle", "11", 4);
- try t.release("middle", "11", 4);
+ try t.press("middle", "11", 3);
+ try t.release("middle", "11", 3);
try t.wait(10000, "ZZE");
try t.stable(700, 15000);
try t.snap("atexec");
// LOOK on the second one (col 24, inside its `echo`) runs it too, in the same
// command pane now its first is done, below it, AND focuses it — that is the
// whole difference between the two verbs
- try t.press("right", "24", 4);
- try t.release("right", "24", 4);
+ try t.press("right", "24", 3);
+ try t.release("right", "24", 3);
try t.wait(10000, "ZZL");
try t.stable(700, 15000);
try t.snap("atlook");
// `Look p.txt` middle-dragged: the builtin by NAME, with an argument
- try t.press("middle", "36", 4);
- try t.drag("middle", "45", 4);
- try t.release("middle", "45", 4);
+ try t.press("middle", "36", 3);
+ try t.drag("middle", "45", 3);
+ try t.release("middle", "45", 3);
try t.wait(10000, "just text");
try t.stable(700, 15000);
try t.snap("lookword");
@@ -1388,8 +1388,8 @@ fn cmdword(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
// Look builtin with an argument, and Look opens the directory: a pane named
// for it with a trailing /, listing it (zzmark.txt is only ever in that
// listing: no pane here shows it otherwise), which takes the keyboard
- try t.press("middle", "49", 4);
- try t.release("middle", "49", 4);
+ try t.press("middle", "49", 3);
+ try t.release("middle", "49", 3);
try t.wait(10000, "zzmark.txt");
try t.stable(700, 15000);
try t.snap("nested");
@@ -1449,8 +1449,8 @@ fn lsp(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
try t.stable(700, 20000);
try t.snap("opened");
// park the cursor inside the CALL `helper(41)` (file line 8, grid row 9)
- try t.press("left", "18", 11);
- try t.release("left", "18", 11);
+ try t.press("left", "18", 10);
+ try t.release("left", "18", 10);
try t.stable(400, 5000);
try t.snap("cursor");
// gd on a call: exactly one location comes back, so it JUMPS rather than
@@ -1482,8 +1482,8 @@ fn lsp(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
try t.snap("step");
// gd on something with no declaration behind it (a keyword) answers nothing,
// and nothing is a legal answer: no buffer opens, no error is rendered.
- try t.press("left", "8", 6);
- try t.release("left", "8", 6);
+ try t.press("left", "8", 5);
+ try t.release("left", "8", 5);
try t.key("g");
try t.key("d");
try t.stable(700, 10000);
@@ -1511,8 +1511,8 @@ fn lsp_client(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
try t.wait(8000, "add(1, 2)");
try t.stable(700, 20000);
// cursor into the first `add` call, then helix's goto-definition
- try t.press("left", "13", 6);
- try t.release("left", "13", 6);
+ try t.press("left", "13", 5);
+ try t.release("left", "13", 5);
try t.key("g");
try t.key("d");
try t.wait(10000, "pub fn add");
@@ -1669,8 +1669,8 @@ fn lspcomplete(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
try t.snap("opened");
// Tab with no dot before it is still Tab: line 10 is the closing `}`, and this
// is the plain insert_tab path putting spaces in front of it.
- try t.press("left", "8", 13);
- try t.release("left", "8", 13);
+ try t.press("left", "8", 12);
+ try t.release("left", "8", 12);
try t.key("i");
try t.key("tab");
try t.stable(400, 5000);
@@ -1683,8 +1683,8 @@ fn lspcomplete(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
// retroactively when the empty answer arrives (lspResponse), on the condition
// that the cursor has not moved meanwhile. Four spaces go in after `// note.`
// and the keystroke is not eaten, which is the whole contract.
- try t.press("left", "16", 15);
- try t.release("left", "16", 15);
+ try t.press("left", "16", 14);
+ try t.release("left", "16", 14);
try t.stable(400, 5000);
try t.key("i");
try t.key("tab");
@@ -1694,8 +1694,8 @@ fn lspcomplete(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
try t.settle(100);
// Line 8 (grid row 9, 1-based click row 10) is the switch's empty body. End
// puts the cursor past its indent, and then the dot is typed.
- try t.press("left", "8", 11);
- try t.release("left", "8", 11);
+ try t.press("left", "8", 10);
+ try t.release("left", "8", 10);
try t.stable(400, 5000);
try t.key("i");
try t.key("end");
@@ -1744,8 +1744,8 @@ fn lspcomplete(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
try t.start(41, 120, &.{"notes.txt"});
try t.wait(8000, "abc.def");
try t.stable(700, 20000);
- try t.press("left", "12", 4);
- try t.release("left", "12", 4);
+ try t.press("left", "12", 3);
+ try t.release("left", "12", 3);
try t.key("i");
try t.key("tab");
try t.stable(400, 5000);
@@ -1763,8 +1763,8 @@ fn lspcomplete(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
try t.start(19, 100, &.{"c.zig"});
try t.wait(8000, "nosemi");
try t.stable(700, 20000);
- try t.press("left", "8", 10);
- try t.release("left", "8", 10);
+ try t.press("left", "8", 9);
+ try t.release("left", "8", 9);
try t.stable(400, 5000);
try t.key("i");
try t.key("end");
@@ -1784,8 +1784,8 @@ fn lspcomplete(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
try t.start(19, 100, &.{"d.zig"});
try t.wait(8000, "nobrace");
try t.stable(700, 20000);
- try t.press("left", "8", 11);
- try t.release("left", "8", 11);
+ try t.press("left", "8", 10);
+ try t.release("left", "8", 10);
try t.stable(400, 5000);
try t.key("i");
try t.key("end");
@@ -1821,8 +1821,8 @@ fn lspcompletemoved(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
try t.start(21, 120, &.{"a.zig"});
try t.wait(8000, "verdigris");
try t.stable(700, 20000);
- try t.press("left", "16", 15);
- try t.release("left", "16", 15);
+ try t.press("left", "16", 14);
+ try t.release("left", "16", 14);
try t.stable(400, 5000);
try t.key("i");
try t.key("tab");
@@ -1851,12 +1851,12 @@ fn lspdebug(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
try t.snap("opened");
// Ctrl-click jumps to the definition; plain click only moves the cursor.
- try t.press("ctrl-left", "22", 11);
- try t.release("ctrl-left", "22", 11);
+ try t.press("ctrl-left", "22", 10);
+ try t.release("ctrl-left", "22", 10);
try t.stable(700, 15000);
try t.snap("ctrlclick");
- try t.press("left", "22", 11);
- try t.release("left", "22", 11);
+ try t.press("left", "22", 10);
+ try t.release("left", "22", 10);
try t.stable(700, 15000);
try t.snap("plainclick");
@@ -1927,8 +1927,8 @@ fn lsprelpath(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
try t.start(35, 100, &.{"sub/parent.zig"});
try t.wait(8000, "fn pick");
try t.stable(700, 20000);
- try t.press("left", "31", 6);
- try t.release("left", "31", 6);
+ try t.press("left", "31", 5);
+ try t.release("left", "31", 5);
try t.stable(400, 5000);
try t.key("g");
try t.key("r");
@@ -1950,8 +1950,8 @@ fn lsprelpath(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
try t.start(35, 100, &.{"sub/subdir.zig"});
try t.wait(8000, "fn hue");
try t.stable(700, 20000);
- try t.press("left", "29", 6);
- try t.release("left", "29", 6);
+ try t.press("left", "29", 5);
+ try t.release("left", "29", 5);
try t.stable(400, 5000);
try t.key("g");
try t.key("r");
@@ -1965,8 +1965,8 @@ fn lsprelpath(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
try t.stable(700, 15000);
try t.snap("sublook");
try t.style("sublook");
- try t.press("right", "12", 13);
- try t.release("right", "12", 13);
+ try t.press("right", "12", 12);
+ try t.release("right", "12", 12);
try t.stable(700, 15000);
try t.snap("clicked");
try t.done();
@@ -1983,8 +1983,8 @@ fn lsp_rename(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
try t.wait(8000, "helper(41)");
try t.stable(700, 20000);
// Put the cursor inside the top-level call, then use the helix rename binding.
- try t.press("left", "18", 11);
- try t.release("left", "18", 11);
+ try t.press("left", "18", 10);
+ try t.release("left", "18", 10);
try t.key("space");
try t.key("l");
try t.key("r");
@@ -2023,14 +2023,14 @@ fn lsp_rename_files(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
try t.start(25, 100, &.{"lib.rs"});
try t.wait(8000, "pub fn add");
try t.stable(700, 20000);
- try t.press("right", "@main.rs", 4);
- try t.release("right", "@main.rs", 4);
+ try t.press("right", "@main.rs", 3);
+ try t.release("right", "@main.rs", 3);
try t.wait(8000, "let x = add");
try t.stable(700, 15000);
try t.snap("opened");
// into lib.rs's `add`, and rename it from there
- try t.press("left", "@add", 5);
- try t.release("left", "@add", 5);
+ try t.press("left", "@add", 4);
+ try t.release("left", "@add", 4);
try t.stable(400, 5000);
try t.key("space");
try t.key("l");
@@ -2085,12 +2085,12 @@ fn diffview(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
try t.file("src/shape.zig", "const std = @import(\"std\");\n\npub const Shape = union(enum) {\n circle: f32,\n square: f32,\n triangle: struct { base: f32, height: f32 },\n\n const note =\n \\\\areas, defer\n \\\\summed\n ;\n};\n");
try t.file("change.diff", "diff --git a/src/shape.zig b/src/shape.zig\nindex 1111111..2222222 100644\n--- a/src/shape.zig\n+++ b/src/shape.zig\n@@ -1,10 +1,12 @@\n const std = @import(\"std\");\n \n pub const Shape = union(enum) {\n circle: f32,\n- square: u8 = 7,\n+ square: f32,\n+ triangle: struct { base: f32, height: f32 },\n \n const note =\n- \\\\areas\n+ \\\\areas, defer\n+ \\\\summed\n ;\n };\n");
try t.start(31, 100, &.{"change.diff"});
- try t.wait(8000, "Newcol Joincol");
+ try t.wait(8000, "Newcol Help Exit");
try t.stable(700, 20000);
try t.snap("diff-pane");
try t.style("diff-colours");
- try t.press("right", "8", 15);
- try t.release("right", "8", 15);
+ try t.press("right", "8", 14);
+ try t.release("right", "8", 14);
try t.stable(700, 15000);
try t.snap("look-added-line");
// The same diff printed by a command (`git diff`, here `cat`) into a command
@@ -2100,9 +2100,9 @@ fn diffview(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
try t.start(31, 100, &.{"cmds.txt"});
try t.wait(8000, "cmds.txt");
try t.stable(700, 20000);
- try t.press("middle", "7", 4);
- try t.drag("middle", "22", 4);
- try t.release("middle", "22", 4);
+ try t.press("middle", "7", 3);
+ try t.drag("middle", "22", 3);
+ try t.release("middle", "22", 3);
try t.wait(10000, "exit 0");
try t.stable(700, 15000);
try t.snap("command-pane");
@@ -2156,14 +2156,14 @@ fn dirpane(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
try t.start(24, 80, &.{"top.txt"});
try t.wait(8000, "top.txt");
try t.stable(700, 20000);
- try t.press("right", "@sub", 4);
- try t.release("right", "@sub", 4);
+ try t.press("right", "@sub", 3);
+ try t.release("right", "@sub", 3);
try t.wait(8000, "inner.txt");
try t.stable(700, 20000);
try t.snap("dir-open");
// an entry, by its name alone: sub's inner.txt
- try t.press("right", "@inner.txt", 7);
- try t.release("right", "@inner.txt", 7);
+ try t.press("right", "@inner.txt", 6);
+ try t.release("right", "@inner.txt", 6);
try t.wait(8000, "inner-marker");
try t.stable(700, 20000);
try t.snap("entry-open");
@@ -2183,12 +2183,12 @@ fn scrolloff(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
try t.stable(700, 20000);
// right-click the g.txt name in the greeting ls -> file pane under the shell's
// text, 9 body rows
- try t.press("right", "4", 5);
- try t.release("right", "4", 5);
+ try t.press("right", "4", 4);
+ try t.release("right", "4", 4);
try t.wait(10000, "line 3");
try t.stable(700, 15000);
- try t.press("left", "10", 9);
- try t.release("left", "10", 9);
+ try t.press("left", "10", 8);
+ try t.release("left", "10", 8);
try t.stable(400, 5000);
// (b) gg: cursor CAN sit on the top body row, no forced scroll
try t.key("g g");
@@ -2245,7 +2245,7 @@ fn wrap(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
// 48 columns: the 2-column chrome gutter, the 5-column line-number gutter and
// the 1 column the `↩` sits in leave 40 for content.
try t.start(15, 48, &.{"long.txt"});
- try t.wait(8000, "Newcol Joincol");
+ try t.wait(8000, "Newcol Help Exit");
try t.stable(700, 20000);
// the default: five rows for line 1 (200 bytes / 40), the four continuations
// gutterless and starting at `4` `8` `C` `G` — the columns 40, 80, 120, 160 —
@@ -2301,7 +2301,7 @@ fn wrap(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
// 128 columns: 120 for content, and the break is at the `C` — column 120, the
// window's own width. The old 100-column cap would have broken at the `A`.
try t.start(15, 128, &.{"long.txt"});
- try t.wait(8000, "Newcol Joincol");
+ try t.wait(8000, "Newcol Help Exit");
try t.stable(700, 20000);
try t.snap("on-wide");
try t.done();
@@ -2390,8 +2390,10 @@ fn follow(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
// `:` — vim's command line with acme's vocabulary. It focuses the pane's OWN
// tag in NORMAL mode (block cursor; the layout box shows the pane's BODY mode,
// which for this file pane is normal either way). The tag remembers where its
-// cursor was; the first time there is nothing to remember and it starts on
-// Save. The tag's normal mode is the body's: w selects the "Save" span exactly
+// cursor was; the first time there is nothing to remember and it starts at
+// the start of the tag's own text, after the computed words (`Save Undo Del`
+// on this edited file). The tag's normal mode is the body's: b steps back
+// over the words onto Save, w selects the "Save" span exactly
// as a body word motion does, and the execute key runs the word under the
// cursor and hands the body back — same keys as the body, so Tab by default
// (see config.look_key/exec_key). `:` again backs out instead, leaving the tag
@@ -2401,7 +2403,7 @@ fn tagcmd(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
defer t.deinit();
try t.lines("c.txt", 6, "");
try t.start(31, 100, &.{"c.txt"});
- try t.wait(8000, "Newcol Joincol");
+ try t.wait(8000, "Newcol Help Exit");
try t.wait(8000, "c.txt");
try t.stable(700, 20000);
// edit line 1 so Save has something to write
@@ -2411,10 +2413,12 @@ fn tagcmd(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
try t.settle(100);
try t.stable(400, 5000);
try t.snap("edited");
- // `:` -> the tag, in normal mode, cursor on Save
+ // `:` -> the tag, in normal mode, cursor at its own text
try t.key(": :");
try t.stable(400, 5000);
try t.snap("colon");
+ // b three times: back over Del and Undo onto Save; `;` keeps the cursor alone
+ try t.key("b b b ;");
// w -> the "Save" span (selected, like the body's word motion)
try t.key("w");
try t.stable(400, 5000);
@@ -2439,7 +2443,7 @@ fn tagcmd(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
// there are no tag-only hops. `:` is the one key a tag and a body do not
// share: from the body it focuses the pane's own tag, from the tag it hands the
// keyboard back to the body. Each tag remembers its cursor; the first time
-// there is nothing to remember and it starts on Save.
+// there is nothing to remember and it starts at the start of the tag's own text.
//
// Evidence is the `cursor=` header (the ACTIVE pane's cursor, which while a tag
// is focused sits on THAT pane's tag row) plus each pane's layout box, which
@@ -2454,7 +2458,7 @@ fn tagnav(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
try t.config("Jumps new-pane");
try t.file("w.txt", "alpha\nbeta\ngamma");
try t.start(31, 100, &.{"w.txt"});
- try t.wait(8000, "Newcol Joincol");
+ try t.wait(8000, "Newcol Help Exit");
try t.wait(8000, "w.txt");
try t.stable(700, 20000);
// A FILE boots alone, so the launch shell is opened here: Alt-n opens it and
@@ -2472,12 +2476,13 @@ fn tagnav(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
try t.key("space w k enter");
try t.stable(400, 5000);
try t.snap("start");
- // `:` -> the file's OWN tagline, normal mode, on Save
+ // `:` -> the file's OWN tagline, normal mode, at its own text
try t.key(": :");
try t.stable(400, 5000);
try t.snap("colon");
- // w selects in the tag the way it selects in a body
- try t.key("w");
+ // w selects in the tag the way it selects in a body: from the tag's start
+ // (`0`; the cursor starts after the computed words, here the tag's end)
+ try t.key("0 w");
try t.stable(400, 5000);
try t.snap("word");
// l is a motion in the tag, not a hop to the next pane
@@ -2489,7 +2494,7 @@ fn tagnav(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
try t.key("c-w l enter");
try t.stable(400, 5000);
try t.snap("right");
- // `:` there -> that pane's own tag, on its Save the first time
+ // `:` there -> that pane's own tag, at its own text the first time
try t.key(": :");
try t.stable(400, 5000);
try t.snap("right-tag");
@@ -2511,8 +2516,8 @@ fn tagnav(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
try t.key("c-b");
try t.stable(700, 15000);
try t.snap("tty-on");
- try t.press("left", "@Mode", 3);
- try t.release("left", "@Mode", 3);
+ try t.press("left", "@Term+bash", 3);
+ try t.release("left", "@Term+bash", 3);
try t.stable(400, 5000);
try t.snap("tty-tag");
try t.key(":");
@@ -2528,21 +2533,29 @@ fn tagnav(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
try t.key("c-w k");
try t.stable(400, 5000);
try t.snap("column-tag");
- try t.key("w");
+ // On its own text, after its computed words (UX K'1): b moves back onto
+ // them as in a body.
+ try t.key("b");
try t.stable(400, 5000);
try t.snap("column-word");
try t.key("c-w k");
try t.stable(400, 5000);
try t.snap("workspace-tag");
- // `$` is the last cell; five long-word steps back land on `Dump`, and the
- // execute key runs it and gives the keyboard back to the body FIRST -- `Exit`
- // lives up here too, so a builtin that frees the session must never return
- // into a focused header. Dump grows a `Restore <path>` word, which is also the
- // case where the line gets longer than the column you were parked on.
+ // Dump left the window's words (UX K'4): typed into its own text, where
+ // the keyboard starts (K'1), a word like any other. `$` is the last cell;
+ // a long-word step back lands on `Dump`, and the execute key runs it and
+ // gives the keyboard back to the body FIRST -- `Exit` lives up here too,
+ // so a builtin that frees the session must never return into a focused
+ // header. Dump grows a `Restore <path>` word, which is also the case where
+ // the line gets longer than the column you were parked on.
+ try t.key("i");
+ try t.send("Dump");
+ try t.key("esc");
+ try t.settle(100);
try t.key("g l");
try t.stable(400, 5000);
try t.snap("topbar-dollar");
- try t.key("B B B B B");
+ try t.key("B");
try t.stable(400, 5000);
try t.snap("topbar-dump-word");
try t.key("tab");
@@ -2550,12 +2563,13 @@ fn tagnav(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
try t.snap("topbar-exec");
// THE DELETION HAZARD, from the bar itself: `Restore` frees every pane and
// swaps the core out from under the caller. Walk back up onto the word the
- // Dump just grew -- B twice off the tail, because the LONG word motions are the
- // ones that step over a path in one go -- and run it.
+ // Dump just grew -- B three times off the tail (`Dump`, the path, `Restore`),
+ // because the LONG word motions are the ones that step over a path in one
+ // go -- and run it.
try t.key("c-w k");
try t.key("c-w k");
try t.stable(400, 5000);
- try t.key("g l B B");
+ try t.key("g l B B B");
try t.stable(400, 5000);
try t.snap("topbar-restore-word");
try t.key("tab");
@@ -2573,7 +2587,7 @@ fn tagpath(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
defer t.deinit();
try t.lines("c.txt", 4, "");
try t.start(31, 100, &.{"c.txt"});
- try t.wait(8000, "Newcol Joincol");
+ try t.wait(8000, "Newcol Help Exit");
try t.wait(8000, "c.txt");
try t.stable(700, 20000);
try t.snap("start");
@@ -2594,10 +2608,10 @@ fn tagpath(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
try t.stable(400, 5000);
try t.snap("yanked-path");
// Sweep across the path / command boundary without injected padding.
- try t.press("left", "12", 3);
- try t.drag("left", "30", 3);
- try t.drag("left", "42", 3);
- try t.release("left", "42", 3);
+ try t.press("left", "12", 2);
+ try t.drag("left", "30", 2);
+ try t.drag("left", "42", 2);
+ try t.release("left", "42", 2);
try t.stable(400, 5000);
try t.snap("drag-cross");
try t.style("drag-cross");
@@ -2638,13 +2652,12 @@ fn tag(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
try t.start(31, 150, &.{ "-n", "3" });
try t.wait(8000, "t.txt");
try t.stable(700, 20000);
- // Click the one editable separator before Save, directly after the cwd.
- // The former generated alignment gap no longer exists.
- // The layout box shows
+ // Click just past the end of the tag's own text (Term+bash, after the
+ // computed words). The layout box shows
// the pane's BODY mode, not the tag's; `i` then types into the tag where it
// was clicked.
- try t.press("left", "@Save-1", 3);
- try t.release("left", "@Save-1", 3);
+ try t.press("left", "@Term+bash+9", 3);
+ try t.release("left", "@Term+bash+9", 3);
try t.stable(400, 5000);
try t.snap("tag-focus");
try t.key("i");
diff --git a/test/process/tty_images.zig b/test/process/tty_images.zig
index 9c37a40d..bb9da072 100644
--- a/test/process/tty_images.zig
+++ b/test/process/tty_images.zig
@@ -8,7 +8,7 @@ pub const cases = .{
// image panes: right-click a .ppm opens petscii glyph art (no kitty in the
// harness). The tag starts with the renderer's plain state fields followed by
-// its path and `Term Del`; the fields are display-only, while their toggles are
+// its path and `Del`; the fields are display-only, while their toggles are
// builtins under SPC t (the old clickable tag words sat past the pane's right
// edge, so clicking them only ever hit the neighbouring shell's tag).
fn images(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
@@ -53,12 +53,13 @@ fn images(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
// prefix is wider than this source-local column, so widen the grid for this
// final assertion. (A column grip drag intentionally takes width from only
// one neighbour, which cannot expose this 82-column prefix.) Then click the
- // visible tail itself, at its `Term`. This proves the image tag is an ordinary
- // editor rather than accidentally typing at a clipped read-only path.
+ // visible tail itself, past its `Del`, where its own text starts. This proves
+ // the image tag is an ordinary editor rather than accidentally typing at a
+ // clipped read-only path.
try t.resize(31, 400);
try t.stable(400, 5000);
- try t.press("left", "@Term", 7);
- try t.release("left", "@Term", 7);
+ try t.press("left", "@Del+4", 7);
+ try t.release("left", "@Del+4", 7);
try t.stable(400, 5000);
try t.key("i");
try t.send("Zork ");
diff --git a/test/process/tty_layout.zig b/test/process/tty_layout.zig
index 00197a5c..77acd71e 100644
--- a/test/process/tty_layout.zig
+++ b/test/process/tty_layout.zig
@@ -25,7 +25,7 @@ fn colgrip(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
defer t.deinit();
try t.file("w.txt", "x");
try t.start(24, 100, &.{"w.txt"});
- try t.wait(8000, "Newcol Joincol");
+ try t.wait(8000, "Newcol Help Exit");
try t.wait(8000, "w.txt");
try t.stable(700, 20000);
try t.key("a-n");
@@ -56,7 +56,9 @@ fn colgrip(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
try t.done();
}
-// A default pane-tag command collapses to one row and restores the body.
+// A pane-tag command collapses to one row and restores the body. Collapse
+// and Save are no computed words of a clean file's tag (UX K'1), so they are
+// typed into the tag's own text first, where a click runs them as before.
// Exercise real middle clicks twice, then the tag's own execute key twice: a
// click types into the tag, Esc is its normal mode, and Tab executes there.
fn collapse(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
@@ -66,29 +68,35 @@ fn collapse(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
try t.start(25, 160, &.{"kept.txt"});
try t.wait(8000, "KEEP-THIRD");
try t.stable(500, 15000);
+ try t.key(": : i");
+ try t.send("Collapse Save");
+ try t.key("esc");
+ try t.settle(100);
+ try t.key(":");
+ try t.stable(400, 5000);
try t.snap("before");
- try t.press("middle", "@Collapse", 3);
- try t.release("middle", "@Collapse", 3);
+ try t.press("middle", "@Collapse", 2);
+ try t.release("middle", "@Collapse", 2);
try t.stable(500, 8000);
try t.snap("middle-collapsed");
// The terminal remembers its last cursor position even when hidden. The core
// screen explicitly reports null, guarding against a leaked body caret.
try t.snap9p("middle-collapsed-cursor");
- try t.press("middle", "@Collapse", 3);
- try t.release("middle", "@Collapse", 3);
+ try t.press("middle", "@Collapse", 2);
+ try t.release("middle", "@Collapse", 2);
try t.wait(8000, "KEEP-THIRD");
try t.stable(500, 8000);
try t.snap("middle-restored");
- try t.press("left", "@Collapse", 3);
- try t.release("left", "@Collapse", 3);
+ try t.press("left", "@Collapse", 2);
+ try t.release("left", "@Collapse", 2);
try t.key("esc");
try t.settle(100);
try t.key("tab");
try t.stable(500, 8000);
try t.snap("tab-collapsed");
try t.snap9p("tab-collapsed-cursor");
- try t.press("left", "@Collapse", 3);
- try t.release("left", "@Collapse", 3);
+ try t.press("left", "@Collapse", 2);
+ try t.release("left", "@Collapse", 2);
try t.key("esc");
try t.settle(100);
try t.key("tab");
@@ -96,8 +104,8 @@ fn collapse(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
try t.stable(500, 8000);
try t.snap("tab-restored");
// Save via the visible tag; the original bytes must survive all four toggles.
- try t.press("middle", "@Save", 3);
- try t.release("middle", "@Save", 3);
+ try t.press("middle", "@Save", 2);
+ try t.release("middle", "@Save", 2);
try t.stable(500, 8000);
try t.snapFile("unchanged", "kept.txt");
try t.done();
@@ -163,22 +171,22 @@ fn delask(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
try t.settle(100);
try t.stable(400, 5000);
try t.snap("typed");
- try t.press("middle", "@DelBelow", 21);
- try t.release("middle", "@DelBelow", 21);
+ try t.press("middle", "@DelBelow", 20);
+ try t.release("middle", "@DelBelow", 20);
try t.stable(700, 10000);
try t.snap("below-took-click");
// a fresh pane at the foot of the column (acme's New takes the bottom half of
// the last pane), and the third one, now between the file and it, closed by a
// middle click on its tag's Del: no question, and the rows go up as they
// always have
- try t.press("left", "10", 5);
- try t.release("left", "10", 5);
+ try t.press("left", "10", 4);
+ try t.release("left", "10", 4);
try t.stable(400, 5000);
try t.key("space f n");
try t.stable(400, 5000);
try t.snap("four");
- try t.press("middle", "@Del", 20);
- try t.release("middle", "@Del", 20);
+ try t.press("middle", "@Del", 19);
+ try t.release("middle", "@Del", 19);
try t.stable(700, 10000);
try t.snap("mouse-del");
try t.done();
@@ -335,9 +343,9 @@ fn layout_open(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
// execute the file's command (middle drag over line 1): it runs as a command
// pane for sub/, forked at the bottom of the rightmost column, splitting only
// the pane above it
- try t.press("middle", "8", 25);
- try t.drag("middle", "19", 25);
- try t.release("middle", "19", 25);
+ try t.press("middle", "8", 23);
+ try t.drag("middle", "19", 23);
+ try t.release("middle", "19", 23);
try t.wait(10000, "TTYOK");
try t.motion("40", 27);
try t.stable(700, 10000);
@@ -369,7 +377,7 @@ fn shrinktag(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
try t.stable(400, 5000);
try t.snap("before");
// drag the lower pane's grip up under pane 0's tag row: it keeps 2 body rows
- try t.press("left", "1", 18);
+ try t.press("left", "1", 17);
try t.drag("left", "1", 3);
try t.release("left", "1", 3);
try t.motion("40", 25);
@@ -386,15 +394,15 @@ fn shrinktag(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
try t.stable(400, 5000);
// re-enlarge: the lower pane's grip, now under pane 0's 2 body rows, pulled
// back down
- try t.press("left", "1", 7);
- try t.drag("left", "1", 18);
- try t.release("left", "1", 18);
+ try t.press("left", "1", 6);
+ try t.drag("left", "1", 17);
+ try t.release("left", "1", 17);
try t.motion("40", 25);
try t.stable(500, 8000);
try t.snap("restored");
// the bottom pane stops at ITS tag and 2 rows too: its grip dragged past the
// bottom
- try t.press("left", "1", 18);
+ try t.press("left", "1", 17);
try t.drag("left", "1", 31);
try t.release("left", "1", 31);
try t.motion("40", 25);
@@ -411,7 +419,7 @@ fn tagalign(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
try t.dir("deep/nested-project-directory");
try t.file("deep/nested-project-directory/document.txt", "alpha\nbeta\ngamma");
try t.start(31, 100, &.{"deep/nested-project-directory/document.txt"});
- try t.wait(8000, "Newcol Joincol");
+ try t.wait(8000, "Newcol Help Exit");
try t.wait(8000, "document.txt");
try t.stable(700, 20000);
try t.key("a-n");
@@ -426,8 +434,8 @@ fn tagalign(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
try t.snap("overby1");
try t.resize(31, 100);
try t.stable(700, 15000);
- try t.press("left", "12", 3);
- try t.release("left", "12", 3);
+ try t.press("left", "12", 2);
+ try t.release("left", "12", 2);
try t.stable(400, 5000);
try t.snap("clicked");
// The click was on the path, so it drafted a name; Esc keeps it pending and
@@ -443,8 +451,8 @@ fn tagalign(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
try t.key("A");
try t.stable(400, 5000);
try t.snap("revealed");
- try t.press("middle", "@Del", 4);
- try t.release("middle", "@Del", 4);
+ try t.press("middle", "@Del", 3);
+ try t.release("middle", "@Del", 3);
try t.stable(700, 15000);
try t.snap("alone");
try t.done();
@@ -458,7 +466,7 @@ fn tagalign2col(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
try t.dir("deep/proj");
try t.file("deep/proj/document.txt", "alpha\nbeta\ngamma");
try t.start(31, 160, &.{"deep/proj/document.txt"});
- try t.wait(8000, "Newcol Joincol");
+ try t.wait(8000, "Newcol Help Exit");
try t.wait(8000, "document.txt");
try t.stable(700, 20000);
// A shell in a separate right-hand column.
@@ -497,7 +505,7 @@ fn windownav(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
defer t.deinit();
try t.file("w.txt", "alpha\nbeta\ngamma");
try t.start(31, 100, &.{"w.txt"});
- try t.wait(8000, "Newcol Joincol");
+ try t.wait(8000, "Newcol Help Exit");
try t.wait(8000, "w.txt");
try t.stable(700, 20000);
// A FILE boots alone now, so the terminal every hop below needs is opened here:
@@ -578,9 +586,9 @@ fn windowops(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
try t.motion("20", 16);
try t.stable(400, 5000);
try t.snap("hover-h");
- // resize the left pair by the lower pane's grip, 4 rows up (a terminal has no
+ // resize the left pair by the lower pane's grip, 3 rows up (a terminal has no
// rule between panes; pane 0's last row is now 13)
- try t.press("left", "1", 18);
+ try t.press("left", "1", 17);
try t.drag("left", "1", 14);
try t.release("left", "1", 14);
try t.stable(500, 8000);
@@ -604,7 +612,15 @@ fn windowops(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
try t.key("c-w l enter");
try t.stable(400, 5000);
try t.snap("focus-right");
- // Debug overlay on (topbar middle-click on Debug), then off
+ // Debug overlay on, then off: B2 on Debug, a word that left the window
+ // row (UX K'4), typed into its own text after its words (A appends at
+ // the line's end)
+ try t.press("left", "@Find", 1);
+ try t.release("left", "@Find", 1);
+ try t.key("A");
+ try t.send("Debug");
+ try t.key("esc");
+ try t.stable(400, 8000);
try t.press("middle", "@Debug", 1);
try t.release("middle", "@Debug", 1);
try t.stable(400, 8000);
diff --git a/test/process/tty_terminals.zig b/test/process/tty_terminals.zig
index a49d3696..1b14a72f 100644
--- a/test/process/tty_terminals.zig
+++ b/test/process/tty_terminals.zig
@@ -125,8 +125,8 @@ fn ttyedit(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
try t.key("c-b");
try t.stable(600, 8000);
// click into the middle of the first output row
- try t.press("left", "8", 9);
- try t.release("left", "8", 9);
+ try t.press("left", "8", 8);
+ try t.release("left", "8", 8);
try t.stable(400, 5000);
try t.snap("before");
// Enter splits the row there: "one t" stays, "wo three" becomes a real line
@@ -214,7 +214,7 @@ fn ttyhelp(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
var t = try Tty.init(gpa, exe, "ttyhelp");
defer t.deinit();
try t.start(31, 100, &.{});
- try t.wait(8000, "Newcol Joincol");
+ try t.wait(8000, "Newcol Help Exit");
try t.stable(700, 20000);
try t.snap("boot");
try t.press("middle", "@Help", 1);
@@ -303,8 +303,8 @@ fn ttylook(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
// selection: the cursor word expands): the click puts it on the ls command
// line's `ls`, a word no file names, which a terminal lists in a +Search,
// its row the place in that terminal (@p1:1:1-2)
- try t.press("left", "4", 5);
- try t.release("left", "4", 5);
+ try t.press("left", "4", 4);
+ try t.release("left", "4", 4);
try t.stable(400, 5000);
try t.key("enter");
try t.wait(10000, "@p1:1:1-2");
@@ -483,7 +483,7 @@ fn psearch(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
var t = try Tty.init(gpa, exe, "psearch");
defer t.deinit();
try t.start(31, 140, &.{});
- try t.wait(8000, "Newcol Joincol");
+ try t.wait(8000, "Newcol Help Exit");
try t.stable(700, 20000);
// print something to search (a bare boot starts in tty mode; the marker is
// split so the echoed command line, which normal mode hides anyway, can never
@@ -539,20 +539,20 @@ fn psearch(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
// The left click first is the price of the step above: it left the cursor in
// the results buffer, and c-b is read by the ACTIVE pane — there is no tty
// behind a +Search to toggle.
- try t.press("left", "5", 5);
- try t.release("left", "5", 5);
+ try t.press("left", "5", 4);
+ try t.release("left", "5", 4);
try t.stable(400, 5000);
try t.key("c-b");
try t.stable(600, 8000);
- try t.press("right", "5", 5);
- try t.release("right", "5", 5);
+ try t.press("right", "5", 4);
+ try t.release("right", "5", 4);
try t.stable(700, 10000);
try t.snap("ttyinert");
// back in normal mode the same click searches for MARK
try t.key("c-b");
try t.stable(600, 8000);
- try t.press("right", "5", 5);
- try t.release("right", "5", 5);
+ try t.press("right", "5", 4);
+ try t.release("right", "5", 4);
try t.wait(10000, "@p1:2:3");
try t.stable(700, 15000);
try t.snap("rightsearch");
@@ -593,12 +593,12 @@ fn respawn(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
defer t.deinit();
// A row more than its panes take: the notice row under them.
try t.start(32, 140, &.{ "-n", "3" });
- try t.wait(8000, "Newcol Joincol");
+ try t.wait(8000, "Newcol Help Exit");
try t.stable(700, 20000);
// middle-click Del on the lower-left pane's tag: the pane id is freed while
// its shell process stays alive in the slot
- try t.press("middle", "@Collapse+9", 18);
- try t.release("middle", "@Collapse+9", 18);
+ try t.press("middle", "@Del", 18);
+ try t.release("middle", "@Del", 18);
try t.stable(700, 10000);
// Alt-n reuses the freed id -> spawn effect lands on the occupied slot
try t.key("a-n");
@@ -665,9 +665,9 @@ fn cmdexit(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
try t.stable(700, 20000);
try t.snap("opened");
// line 1: `sleep 30` keeps the pty, and the pane says exit 0 regardless
- try t.press("middle", "7", 4);
- try t.drag("middle", "34", 4);
- try t.release("middle", "34", 4);
+ try t.press("middle", "7", 3);
+ try t.drag("middle", "34", 3);
+ try t.release("middle", "34", 3);
try t.wait(10000, "exit 0");
try t.stable(700, 15000);
try t.snap("background");
@@ -675,9 +675,9 @@ fn cmdexit(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
// `sleep 30` lives on (job control gives it its own group) and still holds
// that pane's pty; here the end of file comes at once, and the exit a second
// later, from `false`
- try t.press("middle", "7", 5);
- try t.drag("middle", "54", 5);
- try t.release("middle", "54", 5);
+ try t.press("middle", "7", 4);
+ try t.drag("middle", "54", 4);
+ try t.release("middle", "54", 4);
try t.wait(10000, "exit 1");
try t.stable(700, 15000);
try t.snap("letgo");
@@ -707,17 +707,17 @@ fn look_fd_deep(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
try t.send("cd a && ls && fd");
try t.key("enter");
try t.wait(8000, "c.txt");
- try t.wait(8000, "cwd/a Term");
+ try t.wait(8000, "cwd/a Del Term");
try t.stable(700, 20000);
try t.snap("listed");
- try t.press("right", "6", 8);
- try t.release("right", "6", 8);
+ try t.press("right", "6", 7);
+ try t.release("right", "6", 7);
try t.wait(10000, "deep-marker");
try t.stable(700, 15000);
try t.snap("fd-path-looked");
// the ls name, from the shell's directory
- try t.press("right", "8", 6);
- try t.release("right", "8", 6);
+ try t.press("right", "8", 5);
+ try t.release("right", "8", 5);
try t.wait(10000, "top-marker");
try t.stable(700, 15000);
try t.snap("ls-name-looked");
@@ -752,10 +752,10 @@ fn ghostty_mid(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
try t.key("c-b");
try t.stable(600, 8000);
try t.send("\x1b[I");
- try t.send("\x1b[<35;10;10M\x1b[<35;7;8M\x1b[<35;4;6M");
- try t.send("\x1b[<1;4;6M");
- try t.send("\x1b[<1;4;6m");
- try t.send("\x1b[<35;6;6M");
+ try t.send("\x1b[<35;10;9M\x1b[<35;7;7M\x1b[<35;4;5M");
+ try t.send("\x1b[<1;4;5M");
+ try t.send("\x1b[<1;4;5m");
+ try t.send("\x1b[<35;6;5M");
try t.wait(10000, "GHOSTOK");
try t.stable(700, 10000);
try t.snap("ghostty-mid");
diff --git a/test/process/tty_themes.zig b/test/process/tty_themes.zig
index 1975c02b..8c49b77f 100644
--- a/test/process/tty_themes.zig
+++ b/test/process/tty_themes.zig
@@ -17,6 +17,10 @@ pub const cases = .{
fn theme(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
var t = try Tty.init(gpa, exe, "theme");
defer t.deinit();
+ // From the ring's first, dark (the host's page: the tty's own cells),
+ // through pardes's own, those after a classic and acme's, into the first
+ // faithful ports (DESIGN.md E's groups).
+ try t.config("Theme dark");
try t.file("t.txt", "x");
try t.start(31, 100, &.{ "-n", "3" });
try t.wait(8000, "t.txt");
@@ -30,13 +34,23 @@ fn theme(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
try t.key("esc");
try t.settle(100);
try t.stable(700, 10000);
+ try t.snap("dark");
+ try t.style("dark");
+ try t.press("middle", "@NextColor", 1);
+ try t.release("middle", "@NextColor", 1);
+ try t.stable(700, 10000);
+ try t.snap("light");
+ try t.style("light");
+ try t.press("middle", "@NextColor", 1);
+ try t.release("middle", "@NextColor", 1);
+ try t.stable(700, 10000);
try t.snap("orchard");
try t.style("orchard");
try t.press("middle", "@NextColor", 1);
try t.release("middle", "@NextColor", 1);
try t.stable(700, 10000);
- try t.snap("dusk");
- try t.style("dusk");
+ try t.snap("orchard-black");
+ try t.style("orchard-black");
try t.press("middle", "@NextColor", 1);
try t.release("middle", "@NextColor", 1);
try t.stable(700, 10000);
@@ -45,6 +59,21 @@ fn theme(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
try t.press("middle", "@NextColor", 1);
try t.release("middle", "@NextColor", 1);
try t.stable(700, 10000);
+ try t.snap("mono");
+ try t.style("mono");
+ try t.press("middle", "@NextColor", 1);
+ try t.release("middle", "@NextColor", 1);
+ try t.stable(700, 10000);
+ try t.snap("okabe");
+ try t.style("okabe");
+ try t.press("middle", "@NextColor", 1);
+ try t.release("middle", "@NextColor", 1);
+ try t.stable(700, 10000);
+ try t.snap("sepia");
+ try t.style("sepia");
+ try t.press("middle", "@NextColor", 1);
+ try t.release("middle", "@NextColor", 1);
+ try t.stable(700, 10000);
try t.snap("paper");
try t.style("paper");
try t.press("middle", "@NextColor", 1);
@@ -55,8 +84,13 @@ fn theme(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
try t.press("middle", "@NextColor", 1);
try t.release("middle", "@NextColor", 1);
try t.stable(700, 10000);
- try t.snap("atelier");
- try t.style("atelier");
+ try t.snap("dusk");
+ try t.style("dusk");
+ try t.press("middle", "@NextColor", 1);
+ try t.release("middle", "@NextColor", 1);
+ try t.stable(700, 10000);
+ try t.snap("lapis");
+ try t.style("lapis");
try t.press("middle", "@NextColor", 1);
try t.release("middle", "@NextColor", 1);
try t.stable(700, 10000);
@@ -65,6 +99,16 @@ fn theme(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
try t.press("middle", "@NextColor", 1);
try t.release("middle", "@NextColor", 1);
try t.stable(700, 10000);
+ try t.snap("forge-black");
+ try t.style("forge-black");
+ try t.press("middle", "@NextColor", 1);
+ try t.release("middle", "@NextColor", 1);
+ try t.stable(700, 10000);
+ try t.snap("forge-soft");
+ try t.style("forge-soft");
+ try t.press("middle", "@NextColor", 1);
+ try t.release("middle", "@NextColor", 1);
+ try t.stable(700, 10000);
try t.snap("lagoon");
try t.style("lagoon");
try t.press("middle", "@NextColor", 1);
@@ -90,28 +134,13 @@ fn theme(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
try t.press("middle", "@NextColor", 1);
try t.release("middle", "@NextColor", 1);
try t.stable(700, 10000);
- try t.snap("forge-black");
- try t.style("forge-black");
- try t.press("middle", "@NextColor", 1);
- try t.release("middle", "@NextColor", 1);
- try t.stable(700, 10000);
- try t.snap("forge-soft");
- try t.style("forge-soft");
- try t.press("middle", "@NextColor", 1);
- try t.release("middle", "@NextColor", 1);
- try t.stable(700, 10000);
- try t.snap("orchard-black");
- try t.style("orchard-black");
- try t.press("middle", "@NextColor", 1);
- try t.release("middle", "@NextColor", 1);
- try t.stable(700, 10000);
try t.snap("acme");
try t.style("acme");
try t.press("middle", "@NextColor", 1);
try t.release("middle", "@NextColor", 1);
try t.stable(700, 10000);
- try t.snap("lapis");
- try t.style("lapis");
+ try t.snap("atelier");
+ try t.style("atelier");
try t.press("middle", "@NextColor", 1);
try t.release("middle", "@NextColor", 1);
try t.stable(700, 10000);
@@ -120,7 +149,6 @@ fn theme(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
try t.press("middle", "@NextColor", 1);
try t.release("middle", "@NextColor", 1);
try t.stable(700, 10000);
- // After orchard_black: acme and lapis, then the first faithful ports.
try t.snap("solarized-dark");
try t.style("solarized-dark");
try t.done();
@@ -138,10 +166,10 @@ fn theme(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
// running it and stopping. There is still no preview state, nothing to confirm
// and nothing to cancel: the row you ran is the theme you have.
//
-// The whole ring is in the buffer, in sections: the fifteen native themes,
-// acme and lapis, the faithful ports a family at a time, the legacy helix and
-// dark, then everything exported from the vendored helix .toml and zed .json
-// files, sorted. The colors below are
+// The whole ring is in the buffer, in sections (DESIGN.md E): pardes's own,
+// those after a classic, acme's, the faithful ports a family at a time, the
+// captured helix, then everything imported from the vendored helix .toml and
+// zed .json files, a family at a time and the lone ones last, sorted. The colors below are
// read with snapstyle, so this proves the generated themes are real data and
// not just names in a list.
fn themesel(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
@@ -159,66 +187,77 @@ fn themesel(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
// fresh output buffer is where the walk's ring starts, so the first n goes
// into the list and every one after it carries on down it.
try t.key("space t t");
- try t.wait(10000, "Theme orchard");
+ try t.wait(10000, "Theme dark");
try t.stable(700, 15000);
try t.snap("list");
- // n selects row 1 whole and Tab runs it: `Theme orchard`, which is already the
- // boot theme, so only the selection moves. That is the honest first step — an
- // idempotent command has to be safe to run.
+ // n selects row 1 whole and Tab runs it: `Theme dark`, the ring's first;
+ // the theme changes under the cursor one row at a time, a section's
+ // heading and its blank line skipped (Output.isWalkRow).
+ try t.key("space j n");
+ try t.key("tab");
+ try t.stable(700, 15000);
+ try t.snap("step-dark");
+ try t.style("step-dark");
+ try t.key("space j n");
+ try t.key("tab");
+ try t.stable(700, 15000);
+ try t.snap("step-light");
+ try t.style("step-light");
try t.key("space j n");
try t.key("tab");
try t.stable(700, 15000);
try t.snap("step-orchard");
try t.style("step-orchard");
- // ...and now the theme really does change under the cursor, one row at a time
try t.key("space j n");
try t.key("tab");
try t.stable(700, 15000);
- try t.snap("step-dusk");
- try t.style("step-dusk");
- // Selection alone can skip rows without previewing or applying their themes.
- // Four steps reach atelier, the Acme homage; Tab then applies it.
- try t.key("space j n");
+ try t.snap("step-orchard-black");
+ try t.style("step-orchard-black");
try t.key("space j n");
+ try t.key("tab");
+ try t.stable(700, 15000);
+ try t.snap("step-ink");
+ try t.style("step-ink");
try t.key("space j n");
+ try t.key("tab");
+ try t.stable(700, 15000);
+ try t.snap("step-mono");
+ try t.style("step-mono");
try t.key("space j n");
try t.key("tab");
try t.stable(700, 15000);
- try t.snap("step-atelier");
- try t.style("step-atelier");
+ try t.snap("step-okabe");
+ try t.style("step-okabe");
try t.key("space j n");
try t.key("tab");
try t.stable(700, 15000);
- try t.snap("step-forge");
- try t.style("step-forge");
+ try t.snap("step-sepia");
+ try t.style("step-sepia");
try t.key("space j n");
try t.key("tab");
try t.stable(700, 15000);
- try t.snap("step-lagoon");
- try t.style("step-lagoon");
+ try t.snap("step-paper");
+ try t.style("step-paper");
try t.key("space j n");
try t.key("tab");
try t.stable(700, 15000);
- try t.snap("step-solarium");
- try t.style("step-solarium");
+ try t.snap("step-daybreak");
+ try t.style("step-daybreak");
try t.key("space j n");
try t.key("tab");
try t.stable(700, 15000);
- try t.snap("step-spectrum");
- try t.style("step-spectrum");
+ try t.snap("step-dusk");
+ try t.style("step-dusk");
try t.key("space j n");
try t.key("tab");
try t.stable(700, 15000);
- try t.snap("step-harvest");
- try t.style("step-harvest");
+ try t.snap("step-lapis");
+ try t.style("step-lapis");
try t.key("space j n");
try t.key("tab");
try t.stable(700, 15000);
- try t.snap("step-clay");
- try t.style("step-clay");
- // The three native contrast variants precede acme and lapis, and then the first
- // ported family's section. Its heading
- // and blank separator are not stops in the n/N command walk.
+ try t.snap("step-forge");
+ try t.style("step-forge");
try t.key("space j n");
try t.key("tab");
try t.stable(700, 15000);
@@ -232,8 +271,28 @@ fn themesel(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
try t.key("space j n");
try t.key("tab");
try t.stable(700, 15000);
- try t.snap("step-orchard-black");
- try t.style("step-orchard-black");
+ try t.snap("step-lagoon");
+ try t.style("step-lagoon");
+ try t.key("space j n");
+ try t.key("tab");
+ try t.stable(700, 15000);
+ try t.snap("step-solarium");
+ try t.style("step-solarium");
+ try t.key("space j n");
+ try t.key("tab");
+ try t.stable(700, 15000);
+ try t.snap("step-spectrum");
+ try t.style("step-spectrum");
+ try t.key("space j n");
+ try t.key("tab");
+ try t.stable(700, 15000);
+ try t.snap("step-harvest");
+ try t.style("step-harvest");
+ try t.key("space j n");
+ try t.key("tab");
+ try t.stable(700, 15000);
+ try t.snap("step-clay");
+ try t.style("step-clay");
try t.key("space j n");
try t.key("tab");
try t.stable(700, 15000);
@@ -242,17 +301,13 @@ fn themesel(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
try t.key("space j n");
try t.key("tab");
try t.stable(700, 15000);
- try t.snap("step-lapis");
- try t.style("step-lapis");
+ try t.snap("step-atelier");
+ try t.style("step-atelier");
try t.key("space j n");
try t.key("tab");
try t.stable(700, 15000);
try t.snap("step-dark-plus");
try t.style("step-dark-plus");
- // across the Visual Studio Code section into Solarized: a section heading and
- // its blank line are skipped like the first. (The imported half, past the
- // legacy section, is sorted by name, so the ring is the same everywhere
- // whatever order the directory read handed the files over in.)
try t.key("space j n");
try t.key("tab");
try t.stable(700, 15000);