diff options
Diffstat (limited to 'test/process/other_files.zig')
| -rw-r--r-- | test/process/other_files.zig | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/test/process/other_files.zig b/test/process/other_files.zig index 17cc198c..38aa0bd5 100644 --- a/test/process/other_files.zig +++ b/test/process/other_files.zig @@ -28,9 +28,9 @@ fn removeRoot(root: []const u8) void { _ = system(std.fmt.bufPrintSentinel(&cmd, "rm -rf -- '{s}'", .{root}, 0) catch return); } -fn recentExists(root: []const u8) bool { +fn stateExists(root: []const u8) bool { var buf: [4200]u8 = undefined; - return std.c.access(std.fmt.bufPrintSentinel(&buf, "{s}/.local/state/pardes/recent", .{root}, 0) catch return false, 0) == 0; + return std.c.access(std.fmt.bufPrintSentinel(&buf, "{s}/.local/share/pardes/pardes.xitdb", .{root}, 0) catch return false, 0) == 0; } /// A script types and clicks as the user does: no sleep or poll between a @@ -90,8 +90,8 @@ fn heldConnection(gpa: std.mem.Allocator, exe: [:0]const u8) !void { try std.testing.expectError(error.NotFound, c.walk(body)); } -/// The list is kept under $XDG_STATE_HOME (here HOME's .local/state) across -/// restarts. +/// The list is kept in the state file (Db.zig), under $XDG_DATA_HOME (here +/// HOME's .local/share), across restarts. fn recentSurvivesRestart(gpa: std.mem.Allocator, exe: [:0]const u8) !void { var arena = std.heap.ArenaAllocator.init(gpa); defer arena.deinit(); @@ -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(recentExists(root)); + try std.testing.expect(stateExists(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,7 +139,7 @@ fn delTwice(c: *process.Conn, ctl: []const u8) !void { c.write(ctl, "Del\n") catch try c.write(ctl, "Del\n"); } -/// Recent's file (Store.zig) shared with no restart; a pane Del'd in one +/// Recent's state file (Db.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 recentShared(gpa: std.mem.Allocator, exe: [:0]const u8) !void { @@ -181,5 +181,5 @@ fn recentShared(gpa: std.mem.Allocator, exe: [:0]const u8) !void { try std.testing.expect(!has(body, "kept across a Del")); } } - try std.testing.expect(recentExists(root)); + try std.testing.expect(stateExists(root)); } |
