diff options
Diffstat (limited to 'src/fs.zig')
| -rw-r--r-- | src/fs.zig | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -308,8 +308,10 @@ test "virtual writes enforce permissions even when contents are empty" { const p = try pardes.Pardes.init(std.testing.allocator, .{ .tty_only = true }); defer p.deinit(); for ([_][]const u8{ "", "bytes" }) |bytes| { - for ([_][]const u8{ "/virtual/index", "/virtual/screen", "/virtual/README", "/n/self/log" }) |path| + for ([_][]const u8{ "/virtual/index", "/virtual/screen", "/virtual/README" }) |path| try std.testing.expectError(error.ReadOnlyFilesystem, write(p, path, bytes)); + // /log takes one word, `follow`, and only on the open it changes. + if (bytes.len > 0) if (write(p, "/n/self/log", bytes)) |_| return error.TestUnexpectedResult else |_| {}; try std.testing.expectError(error.IsDirectory, write(p, "/virtual/pane", bytes)); try std.testing.expectError(error.FileNotFound, write(p, "/virtual/missing", bytes)); try std.testing.expectError(error.FileNotFound, write(p, "/virtual/cons", bytes)); @@ -1240,9 +1242,9 @@ pub const Namespace = struct { panes: [MAX_PANES]tree.pane.State = @splat(.{}), listeners: u16 = 0, origin: u8 = 'K', - /// The editor-wide event stream, recorded only while /log is held open. - log: tree.events.Queue = .{}, - log_readers: u16 = 0, + /// The editor-wide event ring: panes made, renamed, saved and closed, and + /// what the editor said. Recorded whether or not anyone reads /log. + log: tree.events.Queue = .{ .cap = limits.log_bytes }, /// What the last look or exec created or touched, answered by reading /// either of those files. results: [MAX_PANES]u32 = undefined, |
