summaryrefslogtreecommitdiff
path: root/test/process
diff options
context:
space:
mode:
Diffstat (limited to 'test/process')
-rw-r--r--test/process/cli.zig8
-rw-r--r--test/process/tty_boot.zig78
-rw-r--r--test/process/tty_terminals.zig2
3 files changed, 22 insertions, 66 deletions
diff --git a/test/process/cli.zig b/test/process/cli.zig
index 083ba368..bf3716a8 100644
--- a/test/process/cli.zig
+++ b/test/process/cli.zig
@@ -52,8 +52,12 @@ fn helpOffline(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
try expectRan(try pardes(a, exe, root, &.{ "help", "attach" }), 0, "\n pardes attach box:notes ", "help attach");
try expectRan(try pardes(a, exe, root, &.{ "help", "new" }), 0, " --detach[=NAME]", "help new");
try expectRan(try pardes(a, exe, root, &.{ "help", "fs" }), 0, "usage: fs ls [PATH]", "help fs");
- try expectRan(try pardes(a, exe, root, &.{ "help", "Newcol" }), 0, "Newcol (the root ctl; SPC c n; column)", "help Newcol");
- try expectRan(try pardes(a, exe, root, &.{ "help", "Save" }), 0, "pardes do Save", "help Save");
+ // A builtin: what `Help <Word>` shows, its whole documentation.
+ const newcol = try pardes(a, exe, root, &.{ "help", "Newcol" });
+ try expectRan(newcol, 0, "SPC c n Newcol", "help Newcol");
+ try expectRan(newcol, 0, "\nacts on: the session (over 9P, the root ctl)\n", "help Newcol");
+ try expectRan(try pardes(a, exe, root, &.{ "help", "Save" }), 0, "\nfrom a shell: pardes do Save [ARG]\n", "help Save");
+ try expectRan(try pardes(a, exe, root, &.{ "help", "Diff" }), 0, "`Diff <hash>`", "help Diff");
try expectRan(try pardes(a, exe, root, &.{ "help", "pane/3/addr" }), 0, "pane/<n>/ name body tag", "help pane/3/addr");
try expectRan(try pardes(a, exe, root, &.{ "help", "nowhere" }), 1, "is not a command, a builtin", "help nowhere");
const all = try pardes(a, exe, root, &.{ "help", "--all" });
diff --git a/test/process/tty_boot.zig b/test/process/tty_boot.zig
index 51aea53b..6373de84 100644
--- a/test/process/tty_boot.zig
+++ b/test/process/tty_boot.zig
@@ -122,64 +122,16 @@ fn builtins(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
// The full index includes commands without leader paths.
try t.key("space ?");
- try t.wait(10000, "pardes builtins, and how to run each:");
+ try t.wait(10000, "pardes builtins: each one's keys and its name");
try t.wait(10000, "ClipPasteBefore");
- try t.key("g e");
- // Every builtin added since adds an index line, and one wheel tick is one row
- // (config.wheel_rows): scroll far enough to expose Look and Exec above the
- // bottom viewport while keeping the same pane geometry for the later clicks.
- try t.wheel("up", "110", 50);
- try t.wheel("up", "110", 50);
- try t.wheel("up", "110", 50);
- try t.wheel("up", "110", 50);
- try t.wheel("up", "110", 50);
- try t.wheel("up", "110", 50);
- try t.wheel("up", "110", 50);
- try t.wheel("up", "110", 50);
- try t.wheel("up", "110", 50);
- try t.wheel("up", "110", 50);
- try t.wheel("up", "110", 50);
- try t.wheel("up", "110", 50);
- try t.wheel("up", "110", 50);
- try t.wheel("up", "110", 50);
- try t.wheel("up", "110", 50);
- try t.wheel("up", "110", 50);
- try t.wheel("up", "110", 50);
- try t.wheel("up", "110", 50);
- try t.wheel("up", "110", 50);
- try t.wheel("up", "110", 50);
- try t.wheel("up", "110", 50);
- try t.wheel("up", "110", 50);
- try t.wheel("up", "110", 50);
- try t.wheel("up", "110", 50);
- try t.wheel("up", "110", 50);
- try t.wheel("up", "110", 50);
- try t.wheel("up", "110", 50);
- try t.wheel("up", "110", 50);
- try t.wheel("up", "110", 50);
- try t.wheel("up", "110", 50);
- try t.wheel("up", "110", 50);
- try t.wheel("up", "110", 50);
- try t.wheel("up", "110", 50);
- try t.wheel("up", "110", 50);
- try t.wheel("up", "110", 50);
- try t.wheel("up", "110", 50);
- try t.wheel("up", "110", 50);
- try t.wheel("up", "110", 50);
- try t.wheel("up", "110", 50);
- try t.wheel("up", "110", 50);
- try t.wheel("up", "110", 50);
- try t.wheel("up", "110", 50);
- try t.wheel("up", "110", 50);
- try t.wheel("up", "110", 50);
- try t.wheel("up", "110", 50);
- try t.wheel("up", "110", 50);
- try t.wheel("up", "110", 50);
- try t.wheel("up", "110", 50);
+ // The words with no SPC path come last, each under its documentation:
+ // a search for Look's row, the one line that starts with blanks and
+ // `Look ` (its documentation's lines start with a letter).
+ try t.key("/");
+ try t.send("^ +Look ");
+ try t.key("enter");
try t.wait(10000, "Look enter, right-click");
try t.wait(10000, "Exec tab, middle-click");
- try t.wait(10000, "Filter");
- try t.wait(10000, "Theme");
try t.stable(700, 15000);
// n moves through look-able text; it must not execute command names.
@@ -196,8 +148,9 @@ fn builtins(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
try t.wait(10000, "Tutor");
try t.stable(700, 15000);
try t.snap("docs-group");
- try t.press("middle", "@Tutor", 16);
- try t.release("middle", "@Tutor", 16);
+ // Tutor's row, under the documentation of the three before it
+ try t.press("middle", "@Tutor", 24);
+ try t.release("middle", "@Tutor", 24);
try t.wait(10000, "PARDES TUTOR");
try t.stable(700, 15000);
try t.snap("tutor-from-index");
@@ -539,7 +492,7 @@ fn leader(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
// 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, and how to run each:");
+ try t.wait(10000, "pardes builtins: each one's keys and its name");
try t.wait(10000, "ClipPasteBefore");
try t.key("space h ?");
try t.wait(10000, "under SPC h");
@@ -562,16 +515,15 @@ fn leader(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
try t.stable(700, 15000);
try t.key("space ?");
- try t.wait(10000, "pardes builtins, and how to run each:");
+ 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 t.wait(10000, "under SPC t");
- try t.wait(10000, "Ascii");
- try t.wait(10000, "Palette");
- try t.wait(10000, "Petscii");
- try t.wait(10000, "Wrap");
+ // 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 t.wait(10000, "under SPC c");
diff --git a/test/process/tty_terminals.zig b/test/process/tty_terminals.zig
index dfb027e2..9f7c9308 100644
--- a/test/process/tty_terminals.zig
+++ b/test/process/tty_terminals.zig
@@ -231,7 +231,7 @@ fn ttyhelp(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
// 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 Y ClipYankMain");
+ try t.wait(10000, "SPC ? Help");
try t.stable(700, 15000);
try t.snap("leaderworks");
try t.done();