diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-04 11:03:55 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-04 11:03:55 -0300 |
| commit | 21e09998114a866ae76ecef68d660e84561daa44 (patch) | |
| tree | 12237b50e772df336e2c8fc7d59cfd69607d4afb /test/snapshot.zig | |
| parent | 5752e5c94f27eced137f4ca061c68715d8b7131a (diff) | |
| download | pardes-21e09998114a866ae76ecef68d660e84561daa44.tar.gz pardes-21e09998114a866ae76ecef68d660e84561daa44.zip | |
test: the process runner, test/process.zig (docs/next-tests.md, the user's one runner): Files, a running pardes's file tree over its socket with Session's method names (read, write, expect, keys, click, where, screen, focused, newPane, at), dialled by pid or path, and Detached, a `pardes --detach` in a throwaway root that is its HOME, runtime and config directory, with no daemon (PARDES_DAEMON=off) so nothing outlives it, its stderr kept and said if it exits early; the pty mode is e2e_harness's Harness with process.of; the process-test step runs test/process_test.zig over test/process/*.zig, its first case fs.py's keys_and_mouse (gone from fs.py); snap9p reads /screen through Files; all 113 snap scripts pass
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
Diffstat (limited to 'test/snapshot.zig')
| -rw-r--r-- | test/snapshot.zig | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/test/snapshot.zig b/test/snapshot.zig index 1bd4dabf..95d07cc7 100644 --- a/test/snapshot.zig +++ b/test/snapshot.zig @@ -67,7 +67,7 @@ const std = @import("std"); const libc = std.c; const ghostty_vt = @import("ghostty-vt"); const eh = @import("e2e_harness.zig"); -const Client = @import("9p_io").Client; +const process = @import("process.zig"); // This harness parses the app's output with its OWN ghostty-vt, which narrates // every sequence it does not implement — vaxis's startup capability probes @@ -1289,10 +1289,9 @@ const Screen9p = struct { }; fn snap9p(arena: std.mem.Allocator, h: *eh.Harness, label: []const u8, prev: *Prev) ![]u8 { - var dial_buf: [24]u8 = undefined; - const dial = try std.fmt.bufPrint(&dial_buf, "{d}", .{h.pid}); - const bytes = try Client.read(gpa, dial, "/screen", "/screen"); - defer gpa.free(bytes); + var files = process.of(gpa, h); + defer files.deinit(); + const bytes = try files.read("/screen"); const parsed = try std.json.parseFromSlice(Screen9p, gpa, bytes, .{}); defer parsed.deinit(); const screen = parsed.value; |
