summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-09-27 22:46:26 -0300
committerGabriel Schneider <[email protected]>2026-10-01 00:12:14 -0300
commit71a9f04342493325c10b1b9bc122a88d41143782 (patch)
treec9b1f27a84404a8332c4066a56d922a031eec194 /test
parentd126715cd20a39dbc10870318968546f5e371b97 (diff)
downloadpardes-71a9f04342493325c10b1b9bc122a88d41143782.tar.gz
pardes-71a9f04342493325c10b1b9bc122a88d41143782.zip
Give the pipe its own fields in Pipe
Not a pure move: state moves. Pardes's `pipe_seq` and `pipe_wait` become Pipe.zig's own fields `seq` and `wait`, and Pardes embeds one as `pipe: Pipe = .{}`. pipeRequest reads only the request in flight, so it now takes `pipe: *const Pipe` and the four shells call `core.pipe.pipeRequest(id)` (their Pipe imports go away again); the other pipe functions still need the panes and keep `p: *Pardes`, writing `p.pipe.seq/wait`. Field reads in dump.zig, the shells' tests and two test files follow (`core.pipe_wait` becomes `core.pipe.wait`). No behaviour change. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'test')
-rw-r--r--test/fs_namespace.zig4
-rw-r--r--test/panes.zig2
2 files changed, 3 insertions, 3 deletions
diff --git a/test/fs_namespace.zig b/test/fs_namespace.zig
index ffdc084c..822577d8 100644
--- a/test/fs_namespace.zig
+++ b/test/fs_namespace.zig
@@ -81,7 +81,7 @@ test "transactional restore preserves host capabilities and advances pane identi
defer p.deinit();
const pane = try p.setTestFile("before\n");
p.lsp_seq = 41;
- p.pipe_seq = 73;
+ p.pipe.seq = 73;
if (@hasField(pardes.CellPixels, "w")) p.cell_pixels = .{ .w = 9, .h = 18 };
p.native_images = true;
p.fs.socket_path = "/tmp/session.sock";
@@ -91,7 +91,7 @@ test "transactional restore preserves host capabilities and advances pane identi
const restored = try pardes.dump.restore(p, p.dump_out.?);
defer restored.deinit();
try std.testing.expectEqual(@as(u32, 41), restored.lsp_seq);
- try std.testing.expectEqual(@as(u32, 73), restored.pipe_seq);
+ try std.testing.expectEqual(@as(u32, 73), restored.pipe.seq);
try std.testing.expectEqual(p.cell_pixels, restored.cell_pixels);
try std.testing.expect(restored.native_images);
try std.testing.expect(restored.panes[0].?.serial > p.next_serial);
diff --git a/test/panes.zig b/test/panes.zig
index 1c861070..60dabb8a 100644
--- a/test/panes.zig
+++ b/test/panes.zig
@@ -1749,7 +1749,7 @@ test "tag prompt owns the pipe behavior through cancellation and submission" {
try std.testing.expectEqual(how, pane.prompt.pipe.how);
p.update(.{ .key = .{ .cp = 'c', .text = "cat" } });
p.update(.{ .key = .{ .cp = Key.enter } });
- const pending = p.pipe_wait orelse return error.MissingPipe;
+ const pending = p.pipe.wait orelse return error.MissingPipe;
try std.testing.expectEqual(how, pending.how);
try std.testing.expectEqualStrings("cat", pending.command);
try std.testing.expectEqual(@as(usize, 1), pending.inputs.len);