summaryrefslogtreecommitdiff
path: root/test/fs_namespace.zig
diff options
context:
space:
mode:
Diffstat (limited to 'test/fs_namespace.zig')
-rw-r--r--test/fs_namespace.zig15
1 files changed, 5 insertions, 10 deletions
diff --git a/test/fs_namespace.zig b/test/fs_namespace.zig
index 8b6f245e..3eba6639 100644
--- a/test/fs_namespace.zig
+++ b/test/fs_namespace.zig
@@ -245,22 +245,17 @@ test "virtual file opens do not request OS watches" {
while (p.nextEffect()) |effect| if (effect == .watch) return error.VirtualFileWatch;
}
-test "Look at the clone file reserves its own pane and failed opens release it" {
+test "Look at a virtual file opens one pane and failed opens release their slot" {
const p = try pardes.Pardes.init(std.testing.allocator, .{ .tty_only = true });
defer p.deinit();
- p.lookAt(0, "/virtual/new");
- var control_count: usize = 0;
- var scratch_count: usize = 0;
+ p.lookAt(0, "/virtual/index");
+ var opened: usize = 0;
for (p.panes) |slot| {
const pane = slot orelse continue;
const file = pane.file orelse continue;
- if (std.mem.eql(u8, file.path, "/virtual/new")) control_count += 1;
- if (file.output) |output| if (output.from == .cmd and output.from.cmd == .New) {
- scratch_count += 1;
- };
+ if (std.mem.eql(u8, file.path, "/virtual/index")) opened += 1;
}
- try std.testing.expectEqual(@as(usize, 1), control_count);
- try std.testing.expectEqual(@as(usize, 1), scratch_count);
+ try std.testing.expectEqual(@as(usize, 1), opened);
const free = p.freeSlot().?;
try std.testing.expectError(error.FileNotFound, pardes.panes.File.open(p, free, "/n/self/does-not-exist", 0));
try std.testing.expect(p.panes[free] == null);