From 21e09998114a866ae76ecef68d660e84561daa44 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Wed, 4 Nov 2026 11:03:55 -0300 Subject: 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 Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge --- test/snapshot.zig | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'test/snapshot.zig') 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; -- cgit v1.3