summaryrefslogtreecommitdiff
path: root/test/snapshot.zig
diff options
context:
space:
mode:
Diffstat (limited to 'test/snapshot.zig')
-rw-r--r--test/snapshot.zig8
1 files changed, 7 insertions, 1 deletions
diff --git a/test/snapshot.zig b/test/snapshot.zig
index 7fa84a86..7cc5eb91 100644
--- a/test/snapshot.zig
+++ b/test/snapshot.zig
@@ -619,7 +619,13 @@ fn runScript(arena: std.mem.Allocator, exe_z: [:0]const u8, script_path: []const
const cmd = tok.next().?;
errdefer std.debug.print(" at {s}:{d}: {s}\n", .{ script_path, lineno, line });
- if (std.mem.eql(u8, cmd, "file")) {
+ if (std.mem.eql(u8, cmd, "config")) {
+ // Appended to the startup config this script's fake home already
+ // has, so a script can pin a setting instead of spelling out the
+ // screen geometry a default implies. Must precede `start`.
+ const setting = try std.fmt.allocPrint(arena, "{s}\n", .{tok.rest()});
+ try eh.appendFile(try std.fmt.allocPrintSentinel(arena, "{s}/pardes/init", .{config_home}, 0), setting);
+ } else if (std.mem.eql(u8, cmd, "file")) {
const name = tok.next() orelse return error.BadScript;
try eh.writeFile(try arena.dupeZ(u8, name), try unescape(arena, tok.rest()));
} else if (std.mem.eql(u8, cmd, "lines")) {