summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/macos_e2e.swift2
-rw-r--r--test/output.zig3
-rw-r--r--test/snapshot.zig5
-rw-r--r--test/snapshots/shellset.snap4
4 files changed, 8 insertions, 6 deletions
diff --git a/test/macos_e2e.swift b/test/macos_e2e.swift
index 5f172f9d..2b0eedad 100644
--- a/test/macos_e2e.swift
+++ b/test/macos_e2e.swift
@@ -1251,7 +1251,7 @@ private func buildWorld(stem: String) throws -> String {
// sources $HOME/.bashrc (host_io.Shell) — so this is what pins the
// prompt to `$ ` and keeps the developer's history out of the capture.
try "PS1='$ '\nHISTFILE=\n".write(toFile: "\(home)/.bashrc", atomically: true, encoding: .utf8)
- // ...and the config is not empty, because the DEFAULT shell is fish, whose
+ // ...and the config is not empty, because the DEFAULT shell is $SHELL (fish, say), whose
// prompt carries a hostname and whose greeting carries a version. A golden
// taken against that is a golden for one machine.
try "Shell bash\n".write(toFile: "\(pardesConfig)/init", atomically: true, encoding: .utf8)
diff --git a/test/output.zig b/test/output.zig
index 419bcca2..f3e61e93 100644
--- a/test/output.zig
+++ b/test/output.zig
@@ -544,10 +544,11 @@ test "Config prints the startup path and refreshes its one output" {
for ([_][]const u8{
"Startup config: " ++ path ++ "\n",
"Theme orchard\n",
- "Shell requested (new panes) " ++ config.default_shell ++ " (default)\n",
"Shell effective (last spawn) (none)\n",
"Shell pending on\n",
}) |line| try std.testing.expect(std.mem.indexOf(u8, out.content, line) != null);
+ var default_line: [256]u8 = undefined;
+ try std.testing.expect(std.mem.indexOf(u8, out.content, try std.fmt.bufPrint(&default_line, "Shell requested (new panes) {s} (default)\n", .{config.defaultShell()})) != null);
try std.testing.expectEqualStrings(config.config_buffer, std.fs.path.basename(out.path));
try std.testing.expectEqual(panes.Output.Origin{ .cmd = .Config }, out.output.?.from);
diff --git a/test/snapshot.zig b/test/snapshot.zig
index 2fa8e89c..c49e7645 100644
--- a/test/snapshot.zig
+++ b/test/snapshot.zig
@@ -562,8 +562,9 @@ 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
+ // ...and it is not empty: the DEFAULT shell is $SHELL, whatever this
+ // machine's user logs in with (fish's prompt carries a hostname and its
+ // greeting 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 host_io.Shell's unit tests instead. This is an ordinary
diff --git a/test/snapshots/shellset.snap b/test/snapshots/shellset.snap
index d2bacf38..ef8b02b9 100644
--- a/test/snapshots/shellset.snap
+++ b/test/snapshots/shellset.snap
@@ -2,8 +2,8 @@
# here is the case that has to hold on a machine you did not set up: the name
# resolves to nothing, and the pane opens anyway.
#
-# That is not a corner — it is the DEFAULT's failure mode. pardes ships
-# `Shell fish` as the default, and a box without fish must still get a working
+# That is not a corner — it is the DEFAULT's failure mode. pardes defaults
+# to $SHELL, which may name a shell the box lacks, and it must still get a working
# shell rather than a pane whose child dies at exec and shows one EOF. So the
# lookup falls back, and this is the proof: a name nothing resolves to, and the
# new pane still greets and lists like any other.