summaryrefslogtreecommitdiff
path: root/test/process
diff options
context:
space:
mode:
Diffstat (limited to 'test/process')
-rw-r--r--test/process/tty_editing.zig23
-rw-r--r--test/process/tty_themes.zig3
-rw-r--r--test/process/window.zig5
3 files changed, 29 insertions, 2 deletions
diff --git a/test/process/tty_editing.zig b/test/process/tty_editing.zig
index 0ae99de7..cb903bd6 100644
--- a/test/process/tty_editing.zig
+++ b/test/process/tty_editing.zig
@@ -818,6 +818,8 @@ fn grep(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
fn stepgrain(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
var t = try Tty.init(gpa, exe, "stepgrain");
defer t.deinit();
+ // About the step grain of +Search result rows: `Jumps new-pane` (SPEC §6.6).
+ try t.config("Jumps new-pane");
try t.dir("sub");
try t.file("a.txt", "hello ZQMARK one\nsee also sub/b.txt for ZQMARK two");
try t.file("sub/b.txt", "ZQMARK inside sub");
@@ -870,6 +872,8 @@ fn stepgrain(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
fn look_center(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
var t = try Tty.init(gpa, exe, "look-center");
defer t.deinit();
+ // About a Look at a file already open re-centring that pane: `Jumps new-pane` (SPEC §6.6).
+ try t.config("Jumps new-pane");
try t.lines("big.txt", 200, "");
try t.start(31, 150, &.{ "-n", "3" });
try t.wait(8000, "big.txt");
@@ -961,6 +965,8 @@ fn look_file_1col(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
fn lookloaded(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
var t = try Tty.init(gpa, exe, "lookloaded");
defer t.deinit();
+ // About a Look at a file gone from disk focusing the pane that holds it: `Jumps new-pane` (SPEC §6.6).
+ try t.config("Jumps new-pane");
try t.lines("big.txt", 60, "");
try t.start(31, 100, &.{ "-n", "3" });
try t.wait(8000, "big.txt");
@@ -1126,6 +1132,8 @@ fn lookpanes(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
fn lookrange(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
var t = try Tty.init(gpa, exe, "lookrange");
defer t.deinit();
+ // About r.txt opening below look.txt: `Jumps new-pane` (SPEC §6.6).
+ try t.config("Jumps new-pane");
try t.file("r.txt", "aaaa\nbbbb\ncccc dccc\ndddd\neeee\nffff\ngg NEEDLE gg\nhhhh NEEDLE\niiii");
try t.file("look.txt", "r.txt:3-5\nr.txt:7:4-9\nr.txt:3:2-5:3\nr.txt:8:6-99:9");
// Builtins announce themselves by default, and an announcement is a band at
@@ -1203,6 +1211,8 @@ fn lookrange(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
fn jumps(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
var t = try Tty.init(gpa, exe, "jumps");
defer t.deinit();
+ // About the +Jumps list as text walked with SPC j n/p and Enter: `Jumps new-pane` (SPEC §6.6).
+ try t.config("Jumps new-pane");
try t.lines("big.txt", 200, "");
try t.start(31, 150, &.{"big.txt"});
try t.wait(8000, "big.txt");
@@ -1598,13 +1608,16 @@ fn lsp_client_edit(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
try t.wait(8000, "mod lib;");
try t.stable(700, 15000);
try t.snap("unformatted");
- // rename through the leader prompt: both call sites change in one step
+ // rename through the tag's Rename (SPC l r): both call sites change in
+ // one step
try t.press("left", "13", 6);
try t.release("left", "13", 6);
try t.key("space");
try t.key("l");
try t.key("r");
try t.stable(400, 5000);
+ // The tag's Rename starts with the name under the caret: C-u clears it.
+ try t.key("c-u");
try t.send("sum");
try t.key("enter");
try t.wait(10000, "sum(3, 4)");
@@ -1971,6 +1984,8 @@ fn lsp_rename(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
try t.key("l");
try t.key("r");
try t.stable(400, 5000);
+ // The tag's Rename starts with the name under the caret: C-u clears it.
+ try t.key("c-u");
try t.send("renamed_helper");
try t.key("enter");
try t.wait(10000, "renamed_helper(41)");
@@ -2155,6 +2170,8 @@ fn dirpane(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
fn scrolloff(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
var t = try Tty.init(gpa, exe, "scrolloff");
defer t.deinit();
+ // About today's 9-row file pane its clicks are measured in: `Jumps new-pane` (SPEC §6.6).
+ try t.config("Jumps new-pane");
try t.lines("g.txt", 40, "");
try t.start(16, 210, &.{ "-n", "1" });
try t.wait(8000, "g.txt");
@@ -2426,6 +2443,10 @@ fn tagcmd(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
fn tagnav(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
var t = try Tty.init(gpa, exe, "tagnav");
defer t.deinit();
+ // Its workspace-tag steps Exec `Themes` (B five times from `$`) and type
+ // on into the pane it opens: today's Themes list pane, `Jumps new-pane`
+ // (SPEC §6.6; under walk SPC t t's picker takes those keys).
+ 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");
diff --git a/test/process/tty_themes.zig b/test/process/tty_themes.zig
index 30f1afc3..1975c02b 100644
--- a/test/process/tty_themes.zig
+++ b/test/process/tty_themes.zig
@@ -147,6 +147,9 @@ fn theme(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
fn themesel(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
var t = try Tty.init(gpa, exe, "themesel");
defer t.deinit();
+ // About SPC t t's Themes list pane: `Jumps new-pane` (SPEC §6.6; under
+ // walk it is the themes picker, Pick.zig's own tests).
+ try t.config("Jumps new-pane");
try t.lines("t.txt", 40, "");
try t.start(31, 100, &.{"t.txt"});
try t.wait(8000, "t.txt");
diff --git a/test/process/window.zig b/test/process/window.zig
index 00450a9b..59c84616 100644
--- a/test/process/window.zig
+++ b/test/process/window.zig
@@ -402,7 +402,10 @@ fn corpus(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
defer arena.deinit();
const a = arena.allocator();
defer _ = system("rm -rf -- /tmp/pardes-gui-corpus");
- const init = "Shell /bin/sh\nTheme forge\nMessageLinger 0\nCursorBlink off\n";
+ // Its Looks open panes and Del them by serial, as `Jumps new-pane`
+ // does (SPEC §6.6): under walk a file pane steps in place, a new
+ // serial, and the frames would not be the base's to compare.
+ const init = "Shell /bin/sh\nTheme forge\nMessageLinger 0\nCursorBlink off\nJumps new-pane\n";
var k: Corpus = .{ .gpa = gpa, .a = a, .out = out };
{
try corpusRoot(a);