summaryrefslogtreecommitdiff
path: root/test/snapshot.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-08-02 18:17:37 -0300
committerGabriel Schneider <[email protected]>2026-08-10 09:17:07 -0300
commit35cecf26b06cf50d9827056da99d883ca975c39b (patch)
tree7b228b94313880f2d78fa5f0fb85a0115cfd0e88 /test/snapshot.zig
parent4f980de2c7a2ec29c561bca815c37879a18cc2b3 (diff)
downloadpardes-35cecf26b06cf50d9827056da99d883ca975c39b.tar.gz
pardes-35cecf26b06cf50d9827056da99d883ca975c39b.zip
load builtin commands from the user config before rendering
Diffstat (limited to 'test/snapshot.zig')
-rw-r--r--test/snapshot.zig4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/snapshot.zig b/test/snapshot.zig
index 19b65a02..7c00b97c 100644
--- a/test/snapshot.zig
+++ b/test/snapshot.zig
@@ -307,6 +307,10 @@ fn runScript(arena: std.mem.Allocator, exe_z: [:0]const u8, script_path: []const
// deterministic shell: fixed prompt, no history, no user rc leakage
try eh.writeFile(try std.fmt.allocPrintSentinel(arena, "{s}/.bashrc", .{home}, 0), "PS1='$ '\nHISTFILE=\n");
_ = setenv("HOME", try arena.dupeZ(u8, home), 1);
+ // Keep startup configuration hermetic even when the developer exports an
+ // XDG directory that points outside this per-snapshot fake home.
+ const config_home = try std.fmt.allocPrintSentinel(arena, "{s}/.config", .{home}, 0);
+ _ = setenv("XDG_CONFIG_HOME", config_home, 1);
_ = setenv("TERM", "xterm-256color", 1);
_ = setenv("LC_ALL", "C", 1);
// durations cannot live in a golden; the lsp introspection views print