summaryrefslogtreecommitdiff
path: root/test/process/other_files.zig
diff options
context:
space:
mode:
Diffstat (limited to 'test/process/other_files.zig')
-rw-r--r--test/process/other_files.zig14
1 files changed, 7 insertions, 7 deletions
diff --git a/test/process/other_files.zig b/test/process/other_files.zig
index ad58dd10..17cc198c 100644
--- a/test/process/other_files.zig
+++ b/test/process/other_files.zig
@@ -7,7 +7,7 @@ pub const cases = .{
.{ "other-files: kbdin and mousein drive a detached session as the user would, each write done before it is answered", keysAndMouse },
.{ "other-files: a held connection lists a directory, stats a file, writes and reads, is refused in words and removes a pane", heldConnection },
.{ "other-files: a file opened and closed is in /recent closed, and still is in the next session; Recent's row opens it again", recentSurvivesRestart },
- .{ "other-files: two sessions share one store: a file opened in one is in the other's /recent, a Del'd pane comes back from @p only where it was", storeShared },
+ .{ "other-files: two sessions share Recent: a file opened in one is in the other's /recent, a Del'd pane comes back from @p only where it was", recentShared },
};
extern "c" fn system(cmd: [*:0]const u8) c_int;
@@ -28,9 +28,9 @@ fn removeRoot(root: []const u8) void {
_ = system(std.fmt.bufPrintSentinel(&cmd, "rm -rf -- '{s}'", .{root}, 0) catch return);
}
-fn storeExists(root: []const u8) bool {
+fn recentExists(root: []const u8) bool {
var buf: [4200]u8 = undefined;
- return std.c.access(std.fmt.bufPrintSentinel(&buf, "{s}/.local/state/pardes/store", .{root}, 0) catch return false, 0) == 0;
+ return std.c.access(std.fmt.bufPrintSentinel(&buf, "{s}/.local/state/pardes/recent", .{root}, 0) catch return false, 0) == 0;
}
/// A script types and clicks as the user does: no sleep or poll between a
@@ -111,7 +111,7 @@ fn recentSurvivesRestart(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
try c.write(try std.fmt.allocPrint(a, "/pane/{d}/ctl", .{serial}), "Del\n");
try std.testing.expect(has(try c.read(a, "/recent"), try std.fmt.allocPrint(a, "closed {s}\n", .{kept})));
}
- try std.testing.expect(storeExists(root));
+ try std.testing.expect(recentExists(root));
var two = try process.Detached.start(gpa, exe, "recent2", .{ .root = root });
defer two.deinit();
const c = try process.Conn.dial(gpa, two.socket());
@@ -139,10 +139,10 @@ fn delTwice(c: *process.Conn, ctl: []const u8) !void {
c.write(ctl, "Del\n") catch try c.write(ctl, "Del\n");
}
-/// The store (Store.zig) shared with no restart; a pane Del'd in one
+/// Recent's file (Store.zig) shared with no restart; a pane Del'd in one
/// comes back where it was from a look at its @p serial there, its text
/// with it, and only there.
-fn storeShared(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
+fn recentShared(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
var arena = std.heap.ArenaAllocator.init(gpa);
defer arena.deinit();
const a = arena.allocator();
@@ -181,5 +181,5 @@ fn storeShared(gpa: std.mem.Allocator, exe: [:0]const u8) !void {
try std.testing.expect(!has(body, "kept across a Del"));
}
}
- try std.testing.expect(storeExists(root));
+ try std.testing.expect(recentExists(root));
}