summaryrefslogtreecommitdiff
path: root/test/process
diff options
context:
space:
mode:
Diffstat (limited to 'test/process')
-rw-r--r--test/process/edit.zig3
-rw-r--r--test/process/flags.zig6
-rw-r--r--test/process/look_and_exec.zig3
-rw-r--r--test/process/mounts.zig2
-rw-r--r--test/process/other_files.zig6
-rw-r--r--test/process/root_ctl.zig3
-rw-r--r--test/process/tree.zig6
-rw-r--r--test/process/tty_boot.zig4
-rw-r--r--test/process/tty_editing.zig10
-rw-r--r--test/process/tty_layout.zig2
10 files changed, 36 insertions, 9 deletions
diff --git a/test/process/edit.zig b/test/process/edit.zig
index 30477552..7e86bc8a 100644
--- a/test/process/edit.zig
+++ b/test/process/edit.zig
@@ -36,7 +36,8 @@ const Slow = struct {
};
fn editCommands(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
- var d = try process.Detached.start(gpa, exe, "edit", .{});
+ // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6).
+ var d = try process.Detached.start(gpa, exe, "edit", .{ .init = "Jumps new-pane\n" });
defer d.deinit();
const f = &d.files;
var arena = std.heap.ArenaAllocator.init(gpa);
diff --git a/test/process/flags.zig b/test/process/flags.zig
index 3c54a7ad..10cfd00e 100644
--- a/test/process/flags.zig
+++ b/test/process/flags.zig
@@ -143,7 +143,8 @@ fn forwarding(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
var arena = std.heap.ArenaAllocator.init(gpa);
defer arena.deinit();
const a = arena.allocator();
- var d = try process.Detached.start(gpa, exe, "forwarding", .{});
+ // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6).
+ var d = try process.Detached.start(gpa, exe, "forwarding", .{ .init = "Jumps new-pane\n" });
defer d.deinit();
const c = try Conn.dial(gpa, d.socket());
defer c.deinit(gpa);
@@ -310,7 +311,8 @@ fn waitAndPager(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
var arena = std.heap.ArenaAllocator.init(gpa);
defer arena.deinit();
const a = arena.allocator();
- var d = try process.Detached.start(gpa, exe, "wait", .{});
+ // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6).
+ var d = try process.Detached.start(gpa, exe, "wait", .{ .init = "Jumps new-pane\n" });
var ended = false;
defer if (!ended) d.deinit();
const c = try Conn.dial(gpa, d.socket());
diff --git a/test/process/look_and_exec.zig b/test/process/look_and_exec.zig
index 8ba52534..0c38f241 100644
--- a/test/process/look_and_exec.zig
+++ b/test/process/look_and_exec.zig
@@ -67,7 +67,8 @@ fn canary(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
var arena = std.heap.ArenaAllocator.init(gpa);
defer arena.deinit();
const a = arena.allocator();
- var d = try process.Detached.start(gpa, exe, "flow", .{});
+ // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6).
+ var d = try process.Detached.start(gpa, exe, "flow", .{ .init = "Jumps new-pane\n" });
defer d.deinit();
try d.put("a.txt", "alpha one\nshared word\n");
try d.put("b.txt", "beta two\nshared word\n");
diff --git a/test/process/mounts.zig b/test/process/mounts.zig
index 8a7fc6fe..8ac016c3 100644
--- a/test/process/mounts.zig
+++ b/test/process/mounts.zig
@@ -32,7 +32,9 @@ fn startup(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
defer client.deinit(gpa);
const address = first.abs("pardes-9p-first.sock");
const own = first.abs("pardes-9p-second.sock");
+ // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6).
var second = try Detached.start(gpa, exe, "second", .{
+ .init = "Jumps new-pane\n",
.root = first.root(),
.args = &.{ try std.fmt.allocPrintSentinel(a, "--mount=peer={s}", .{address}, 0), try std.fmt.allocPrintSentinel(a, "--mount=own={s}", .{own}, 0) },
});
diff --git a/test/process/other_files.zig b/test/process/other_files.zig
index 38aa0bd5..69f65884 100644
--- a/test/process/other_files.zig
+++ b/test/process/other_files.zig
@@ -97,7 +97,8 @@ fn recentSurvivesRestart(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
defer arena.deinit();
const a = arena.allocator();
var root_buf: [4096]u8 = undefined;
- var one = try process.Detached.start(gpa, exe, "recent1", .{});
+ // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6).
+ var one = try process.Detached.start(gpa, exe, "recent1", .{ .init = "Jumps new-pane\n" });
const root = keepRoot(&one, &root_buf);
defer removeRoot(root);
const kept = try std.fmt.allocPrint(a, "{s}/kept.txt", .{root});
@@ -147,7 +148,8 @@ fn recentShared(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
defer arena.deinit();
const a = arena.allocator();
var root_buf: [4096]u8 = undefined;
- var one = try process.Detached.start(gpa, exe, "store1", .{});
+ // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6).
+ var one = try process.Detached.start(gpa, exe, "store1", .{ .init = "Jumps new-pane\n" });
const root = keepRoot(&one, &root_buf);
defer removeRoot(root);
{
diff --git a/test/process/root_ctl.zig b/test/process/root_ctl.zig
index 7c27d33e..5fdac20b 100644
--- a/test/process/root_ctl.zig
+++ b/test/process/root_ctl.zig
@@ -42,7 +42,8 @@ fn messagesStay(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
}
fn putallAfterSaves(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
- var d = try process.Detached.start(gpa, exe, "putall", .{});
+ // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6).
+ var d = try process.Detached.start(gpa, exe, "putall", .{ .init = "Jumps new-pane\n" });
defer d.deinit();
const f = &d.files;
var arena = std.heap.ArenaAllocator.init(gpa);
diff --git a/test/process/tree.zig b/test/process/tree.zig
index 8fe3d881..86786603 100644
--- a/test/process/tree.zig
+++ b/test/process/tree.zig
@@ -582,7 +582,8 @@ fn looks(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
var arena = std.heap.ArenaAllocator.init(gpa);
defer arena.deinit();
const a = arena.allocator();
- var d = try process.Detached.start(gpa, exe, "first", .{});
+ // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6).
+ var d = try process.Detached.start(gpa, exe, "first", .{ .init = "Jumps new-pane\n" });
defer d.deinit();
const c = try Conn.dial(gpa, d.socket());
defer c.deinit(gpa);
@@ -606,7 +607,8 @@ fn longNames(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
var arena = std.heap.ArenaAllocator.init(gpa);
defer arena.deinit();
const a = arena.allocator();
- var d = try process.Detached.start(gpa, exe, "long-names", .{});
+ // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6).
+ var d = try process.Detached.start(gpa, exe, "long-names", .{ .init = "Jumps new-pane\n" });
defer d.deinit();
const c = try Conn.dial(gpa, d.socket());
defer c.deinit(gpa);
diff --git a/test/process/tty_boot.zig b/test/process/tty_boot.zig
index 1e52a468..2680a499 100644
--- a/test/process/tty_boot.zig
+++ b/test/process/tty_boot.zig
@@ -440,6 +440,8 @@ fn tutor(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
fn topbarexec(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
var t = try Tty.init(gpa, exe, "topbarexec");
defer t.deinit();
+ // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6).
+ try t.config("Jumps new-pane");
try t.file("zmarkfile.txt", "hay ZQNEEDLE stack");
try t.start(21, 90, &.{ "-n", "3" });
try t.wait(8000, "zmarkfile.txt");
@@ -929,6 +931,8 @@ fn savepane(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
fn filewatch(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
var t = try Tty.init(gpa, exe, "filewatch");
defer t.deinit();
+ // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6).
+ try t.config("Jumps new-pane");
try t.dir("sub");
try t.file("w.txt", "line 1\nline 2\n/tmp/pardes-snap/filewatch/cwd/sub/s.txt\nline 4\nline 5\nline 6\nline 7\nline 8\nline 9\nline 10\nline 11\nline 12\n");
try t.lines("sub/s.txt", 8, "");
diff --git a/test/process/tty_editing.zig b/test/process/tty_editing.zig
index 896a3634..0ae99de7 100644
--- a/test/process/tty_editing.zig
+++ b/test/process/tty_editing.zig
@@ -365,6 +365,8 @@ fn pipe(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
fn chordcut(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
var t = try Tty.init(gpa, exe, "chordcut");
defer t.deinit();
+ // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6).
+ try t.config("Jumps new-pane");
try t.lines("f.txt", 5, "");
try t.lines("g.txt", 2, "");
// The narrow-window fallback splits below the source shell and leaves the
@@ -742,6 +744,8 @@ fn fsearch(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
fn grep(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
var t = try Tty.init(gpa, exe, "grep");
defer t.deinit();
+ // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6).
+ try t.config("Jumps new-pane");
try t.dir("sub");
try t.file("a.txt", "hello TARGET one\nnothing here\nlast TARGET line");
try t.file("sub/b.txt", "deep\nTARGET inside sub");
@@ -1329,6 +1333,8 @@ fn jumps(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
fn cmdword(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
var t = try Tty.init(gpa, exe, "cmdword");
defer t.deinit();
+ // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6).
+ try t.config("Jumps new-pane");
try t.file("cmds.txt", "@`echo ZZ''E` @`echo ZZ''L` Look p.txt @`Look .`");
try t.file("p.txt", "just text");
try t.file("zzmark.txt", "x");
@@ -1891,6 +1897,8 @@ fn lspdebug(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
fn lsprelpath(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
var t = try Tty.init(gpa, exe, "lsprelpath");
defer t.deinit();
+ // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6).
+ try t.config("Jumps new-pane");
try t.dir("sub");
try t.dir("sub/inner");
try t.file("shade.zig", "pub const Shade = enum {\n verdigris,\n cinnabar,\n};\n");
@@ -1988,6 +1996,8 @@ fn lsp_rename(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
fn lsp_rename_files(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
var t = try Tty.init(gpa, exe, "lsp-rename-files");
defer t.deinit();
+ // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6).
+ try t.config("Jumps new-pane");
try t.file("lib.rs", "// main.rs\npub fn add(a: i32, b: i32) -> i32 {\n a + b\n}\n");
try t.file("main.rs", "mod lib;\n\nfn main() {\n let x = add(1, 2);\n let y = add(3, 4);\n let _ = x + y;\n}\n");
try t.start(25, 100, &.{"lib.rs"});
diff --git a/test/process/tty_layout.zig b/test/process/tty_layout.zig
index 3c50b8a5..e0396a53 100644
--- a/test/process/tty_layout.zig
+++ b/test/process/tty_layout.zig
@@ -288,6 +288,8 @@ fn layout_close(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
fn layout_open(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
var t = try Tty.init(gpa, exe, "layout-open");
defer t.deinit();
+ // About a jump opening a pane: `Jumps new-pane` (SPEC §6.6).
+ try t.config("Jumps new-pane");
try t.dir("sub");
try t.file("sub/f.txt", "echo 'TTY'OK");
// A row more than its panes take: the notice row under them.