summaryrefslogtreecommitdiff
path: root/test/process
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-24 21:28:54 -0300
committerGabriel Schneider <[email protected]>2026-11-24 21:40:53 -0300
commit9f4109bceefbfc3e63eaf510eb7d05603e09db9c (patch)
tree6ee3a51a29da114ae9eb0d14891860881cc54f5c /test/process
parente64bd853c33bce38f91c9103c0afceb690333585 (diff)
downloadpardes-9f4109bceefbfc3e63eaf510eb7d05603e09db9c.tar.gz
pardes-9f4109bceefbfc3e63eaf510eb7d05603e09db9c.zip
TagState, Core, Band, process-test: a tag out of rest keeps its rows at rest, a rolled level counts every cell it adds, a doc's paragraphs are rows, and the +Help cases use the word (fixes on top of items 2-5 of line A, uqopxwqz vnqmzpqs kquzozvs okqtwzll moosvmpn, frozen): process-test's six failures on moosvmpn: TAGNAV (row 6's `$` gone after `c-w l enter`, `c-b`) and LOOKPANES (`@alpha` off row 6 after `space w h`, on the parallel pass only): RUN: a screen dumped before each click: lookpanes' shell tag `/tmp/.../cwd C-w …` on ONE row where its own text takes two, the shell's rows moved up one; tagnav's shell pty resized twice by `c-w h enter` from its focused tag (bash's redraw lost its prompt mark); THE CAUSE: Core.zig sync gave a tag out of rest the rows its head takes, and a root's key cell (` C-w …`, ` ␣ …`, before its level shows 250 ms on) is shorter than the tag's own text: the body moved up and back down, a terminal's pty resized under its program (moosvmpn bounded a terminal's rolled level from above only); and TagState.head's room left out the ` …` past the last child that fits, each group's `…` and a struck key (at 100 columns C-w's level took 97 of a terminal's 96 cells, three rows for its two); THE FIX: sync: out of rest (hostOf), a tag keeps the rows its own text takes (layout.wantedTagRows), at least, and a terminal's exactly; tag_top saturates (a head of fewer lines than the tag's rows overflowed `lines - tag_rows` when the tag had the keyboard: a panic the first fix met in tagnav); head counts every cell (exact separators, `…`s, the struck key) and the child whose ` …` would not fit stops the level; DECIDED (SPEC §3.6's give-way order): a text pane's rolled level may wrap its tag to three rows (the first give-way, the §3.7 mockup's two rows), never fewer rows than at rest; a terminal's, exactly its rows at rest; a user hit both: every SPC or C-w in a pane whose tag takes two rows or more moved its body up for 250 ms, and in a terminal resized its program twice; THE BAND (seen in ttyhelp's new golden): a doc's paragraphs, a line each in builtins.Doc.text, were drawn as one row with a `�` for each newline (Band.wrap): each now starts a row; FIND, LEADER, BUILTINS, TTYHELP: `SPC ?` and `?` down a level are Help in the tag now (SPEC §4.5), so the cases that test the +Help index run the word (`Help` from the workspace tag, `Help h`, `Help t`, `Help c`, `Help l` swept with B2 on a line of their file, tty_boot.zig sweepHelp); ttyhelp's `SPC ?` shows the new Help in the focused pane's tag, `tutor` typed into its field; the snapshots taken after SPC wait for its level (the quiet screen of the parallel pass came back before the 250 ms frame: a golden that depended on the pass); leader presses Esc after its struck key (the level stays, A's ruling); GOLDENS, every changed row: find: `group` the rolled SPC f level in the tag over two rows (the hint cut by the cell, acme's wrap), the body a row down, the `SPC f` chip gone; `armed` the tag back at rest; ttyhelp: `leaderworks` the +Help's tag `^ ... Help tutor 1/133`, its band (the row, the doc step, no `�`) pushing its body four rows down; builtins: notes.txt's first line `Help c Help h`; the +Help for SPC h with Keys (SPC h k, item 5) and its documentation, every row under it six down, the +Look search on line 224 for 220, Tutor's row 30 for 24; leader: `spc`, `spc-h`, `unmapped` the rolled levels (SPC's over three rows, `x` struck), cmds.txt's line of five words, the Help announcement chip, the Keys rows, the tutor a row lower under the longer +Help; TESTS FIRST: TagState.zig "a rolled level fits its rows at every width..." (failed: 4 rows), "a terminal's rolled level keeps its tag rows at every width, C-w's as SPC's..." (shell-test; failed: expected 2, found 3), "a tag out of rest keeps its rows at rest at least..." (failed: expected 2, found 1; then the integer overflow at Core.zig:2047 with the keyboard in the tag), Band.zig "a doc's paragraphs are rows of their own..." (failed: a newline in a row)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'test/process')
-rw-r--r--test/process/tty_boot.zig51
-rw-r--r--test/process/tty_editing.zig5
-rw-r--r--test/process/tty_terminals.zig9
3 files changed, 47 insertions, 18 deletions
diff --git a/test/process/tty_boot.zig b/test/process/tty_boot.zig
index 01b35a24..e342ea46 100644
--- a/test/process/tty_boot.zig
+++ b/test/process/tty_boot.zig
@@ -114,14 +114,17 @@ fn boot(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
fn builtins(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
var t = try Tty.init(gpa, exe, "builtins");
defer t.deinit();
- try t.lines("notes.txt", 6, "");
+ // SPC ? is Help in the tag now (pick-ui SPEC §4.5): the +Help index is
+ // the word's, `Help` run from the workspace's tag, `Help c` swept here.
+ try t.file("notes.txt", "Help c Help h\nline 2\nline 3\nline 4\nline 5\nline 6\n");
try t.start(67, 120, &.{"notes.txt"});
try t.wait(8000, "notes.txt");
try t.stable(700, 20000);
try t.snap("boot");
// The full index includes commands without leader paths.
- try t.key("space ?");
+ try t.press("middle", "@Help", 1);
+ try t.release("middle", "@Help", 1);
try t.wait(10000, "pardes builtins: each one's keys and its name");
try t.wait(10000, "ClipPasteBefore");
// The words with no SPC path come last, each under its documentation:
@@ -141,19 +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 t.key("space c ?");
+ try sweepHelp(&t, "@Help#1", 4);
try t.wait(10000, "under SPC c");
try t.wait(10000, "Joincol");
try t.stable(700, 15000);
try t.snap("column-group");
- try t.key("space h ?");
+ try sweepHelp(&t, "@Help#2", 4);
try t.wait(10000, "Tutor");
try t.stable(700, 15000);
try t.snap("docs-group");
- // Tutor's row, under the documentation of the three before it
- try t.press("middle", "@Tutor", 24);
- try t.release("middle", "@Tutor", 24);
+ // Tutor's row, under the documentation of the four before it (Keys,
+ // describe-key, is SPC h k)
+ try t.press("middle", "@Tutor", 30);
+ try t.release("middle", "@Tutor", 30);
try t.wait(10000, "PARDES TUTOR");
try t.stable(700, 15000);
try t.snap("tutor-from-index");
@@ -472,13 +476,18 @@ fn topbarexec(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
fn leader(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
var t = try Tty.init(gpa, exe, "leader");
defer t.deinit();
- try t.file("cmds.txt", "Help");
+ // SPC ? and `?` down a level are Help in the tag now (pick-ui SPEC
+ // §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, "cmds.txt");
try t.stable(700, 20000);
+ // SPC's level, rolled in the tag once its delay is up (a frame on the
+ // clock, which a quiet screen does not wait for)
try t.key("space");
+ try t.wait(5000, "↓ unroll");
try t.stable(400, 5000);
try t.snap("spc");
try t.key("h");
@@ -489,15 +498,21 @@ fn leader(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
try t.stable(400, 5000);
try t.snap("abandoned");
try t.key("space x");
+ try t.wait(5000, "↓ unroll");
try t.stable(400, 5000);
try t.snap("unmapped");
+ // A key the level has no child for is struck and the level stays
+ // (which-key); Esc leaves it.
+ try t.key("esc");
+ try t.settle(100);
+ 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.wait(10000, "pardes builtins: each one's keys and its name");
try t.wait(10000, "ClipPasteBefore");
- try t.key("space h ?");
+ try sweepHelp(&t, "@Help#2", 4);
try t.wait(10000, "under SPC h");
try t.stable(700, 15000);
try t.snap("help-group");
@@ -517,23 +532,24 @@ fn leader(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
try t.key("space d");
try t.stable(700, 15000);
- try t.key("space ?");
+ try t.press("middle", "@Help", 4);
+ try t.release("middle", "@Help", 4);
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 t.key("space t ?");
+ try sweepHelp(&t, "@Help#3", 4);
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 t.key("space c ?");
+ try sweepHelp(&t, "@Help#4", 4);
try t.wait(10000, "under SPC c");
try t.wait(10000, "Joincol");
try t.stable(700, 15000);
try t.snap("help-column");
- try t.key("space l ?");
+ try sweepHelp(&t, "@Help#5", 4);
try t.wait(10000, "WsDiagnostics");
try t.stable(700, 15000);
try t.snap("help-language");
@@ -544,6 +560,15 @@ fn leader(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
try t.done();
}
+/// B2 swept over `Help <key>` from the word `at` on `row` (its six
+/// cells): the word and its argument run, as a sweep anywhere runs them.
+fn sweepHelp(t: *Tty, at: []const u8, row: u16) !void {
+ const end = try std.fmt.allocPrint(t.arena, "{s}+6", .{at});
+ try t.press("middle", at, row);
+ try t.drag("middle", end, row);
+ try t.release("middle", end, row);
+}
+
fn mini(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
var t = try Tty.init(gpa, exe, "mini");
defer t.deinit();
diff --git a/test/process/tty_editing.zig b/test/process/tty_editing.zig
index 53e1da1e..33ad2802 100644
--- a/test/process/tty_editing.zig
+++ b/test/process/tty_editing.zig
@@ -608,9 +608,12 @@ fn find(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
try t.start(41, 120, &.{"here.txt"});
try t.wait(8000, "here.txt");
try t.stable(700, 20000);
- // SPC f is a group (Find, New, Save, Recent, Grep): the indicator waits
+ // SPC f is a group (Find, New, Save, Recent, Grep): its level rolled in
+ // the tag once SPC's delay is up (a frame on the clock, which a quiet
+ // screen does not wait for)
try t.key("space");
try t.key("f");
+ try t.wait(5000, "↓ unroll");
try t.stable(400, 5000);
try t.snap("group");
// the second f opens the query pane: every file listed, line 1 `Find `
diff --git a/test/process/tty_terminals.zig b/test/process/tty_terminals.zig
index 9f7c9308..896ac062 100644
--- a/test/process/tty_terminals.zig
+++ b/test/process/tty_terminals.zig
@@ -226,12 +226,13 @@ fn ttyhelp(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
// row 0, which is not a pane, so the terminal never saw it.
try t.key("c-b");
try t.stable(600, 10000);
+ // SPC ? is Help in the focused pane's tag (pick-ui SPEC §4.5): a field
+ // typed in, the leaves it matches in rows under the tag, the cursor's
+ // documentation beside them.
try t.key("space");
try t.key("?");
- // The bare-tty boot now opens an empty pane under the shell, so the index is
- // half as tall: wait on a row that is on screen. What the leader route
- // produced is the snapshot below, not this.
- try t.wait(10000, "SPC ? Help");
+ try t.send("tutor");
+ try t.wait(10000, "SPC h t · Tutor · help");
try t.stable(700, 15000);
try t.snap("leaderworks");
try t.done();