diff options
Diffstat (limited to 'test/snapshot.zig')
| -rw-r--r-- | test/snapshot.zig | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/snapshot.zig b/test/snapshot.zig index 39350bee..36a5b20b 100644 --- a/test/snapshot.zig +++ b/test/snapshot.zig @@ -311,6 +311,15 @@ fn runScript(arena: std.mem.Allocator, exe_z: [:0]const u8, script_path: []const // 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); + // ...and it is not empty: the DEFAULT shell is fish, whose prompt carries + // a hostname and whose greeting carries a version, so a golden taken + // against it would be a golden for this machine. Every script here runs + // bash — the .bashrc above pins its prompt to `$ ` — and the fish path is + // covered by shell_bin.zig's unit tests instead. This is an ordinary + // config file going through the ordinary startup-config path, so it also + // proves `Shell <name>` is dispatchable from one. + try mkdir(arena, config_home, false); + try eh.writeFile(try std.fmt.allocPrintSentinel(arena, "{s}/pardes", .{config_home}, 0), "Shell bash\n"); _ = setenv("TERM", "xterm-256color", 1); _ = setenv("LC_ALL", "C", 1); // a wall clock cannot live in a golden; everything that would print one |
