summaryrefslogtreecommitdiff
path: root/test/process.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-06 06:24:42 -0300
committerGabriel Schneider <[email protected]>2026-11-06 11:19:44 -0300
commitc1917b949b9580de8bf0977874a210f0266812da (patch)
tree447dd2235ea00634f662cd3becf4bceb8a895f41 /test/process.zig
parent76c55b5bce0f181b0b15b16596c900397dfef544 (diff)
downloadpardes-c1917b949b9580de8bf0977874a210f0266812da.tar.gz
pardes-c1917b949b9580de8bf0977874a210f0266812da.zip
kinds #14, the core's PDF code gone: pdf.zig and pdf_view.zig leave and every pdf_enabled branch with them; look, Jump, Recent, dumps (one from before the addon opens as its pane), the watch, mouse, keys, the rail and the tag go through Kind for any kind's pane; test/pdf.zig's behaviours are T1 cases over 9P (addons_pdf.zig) and pane cases (a Shadow over a replica, a file changed under it), the harnesses load pdf.so by path
Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
Diffstat (limited to 'test/process.zig')
-rw-r--r--test/process.zig18
1 files changed, 12 insertions, 6 deletions
diff --git a/test/process.zig b/test/process.zig
index 0a443a21..67d883ca 100644
--- a/test/process.zig
+++ b/test/process.zig
@@ -512,9 +512,11 @@ pub fn of(gpa: std.mem.Allocator, h: *const eh.Harness) Files {
/// host it was built with.
pub const Backend = enum { tui, gui };
pub var backend: Backend = .tui;
-/// The image addon the build made (the runner's --image-addon=), linked
-/// into each session's data directory, where its start scan finds it.
-pub var image_addon: ?[:0]const u8 = null;
+/// The addons the build made (the runner's --addon=, image and pdf),
+/// linked into each session's data directory, where its start scan finds
+/// them.
+pub var addons: [4][:0]const u8 = undefined;
+pub var naddons: usize = 0;
/// A case about one frontend's own behaviour (`--tty`, a killed terminal
/// editor) skips on the other.
@@ -586,9 +588,13 @@ pub const Detached = struct {
errdefer if (d.cap_len > 0) removeDir(d.captures());
const dir = d.root();
var bufs: [6][4096]u8 = undefined;
- if (image_addon) |lib| {
- for ([_][]const u8{ "/.local", "/.local/share", "/.local/share/pardes", "/.local/share/pardes/addons" }) |sub| _ = libc.mkdir(try std.fmt.bufPrintSentinel(&bufs[5], "{s}{s}", .{ dir, sub }, 0), 0o755);
- _ = libc.symlink(lib, try std.fmt.bufPrintSentinel(&bufs[5], "{s}/.local/share/pardes/addons/image.so", .{dir}, 0));
+ if (naddons > 0) for ([_][]const u8{ "/.local", "/.local/share", "/.local/share/pardes", "/.local/share/pardes/addons" }) |sub| {
+ _ = libc.mkdir(try std.fmt.bufPrintSentinel(&bufs[5], "{s}{s}", .{ dir, sub }, 0), 0o755);
+ };
+ for (addons[0..naddons]) |lib| {
+ const base = std.fs.path.basename(lib);
+ const installed = if (std.mem.startsWith(u8, base, "lib")) base[3..] else base;
+ _ = libc.symlink(lib, try std.fmt.bufPrintSentinel(&bufs[5], "{s}/.local/share/pardes/addons/{s}", .{ dir, installed }, 0));
}
if (opts.init) |text| {
const cfg = try std.fmt.bufPrintSentinel(&bufs[5], "{s}/config", .{dir}, 0);