summaryrefslogtreecommitdiff
path: root/src/Dir.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/Dir.zig')
-rw-r--r--src/Dir.zig25
1 files changed, 2 insertions, 23 deletions
diff --git a/src/Dir.zig b/src/Dir.zig
index ebe6b69c..f43c6e02 100644
--- a/src/Dir.zig
+++ b/src/Dir.zig
@@ -179,8 +179,8 @@ pub fn refresh(p: *Pardes, id: usize) !void {
panes.Output.resetBody(p, now);
}
-/// A look at directory `dir` (look.zig's `.dir`, with `DirLook pane`): its
-/// pane, read again, or a new one, placed as a document is.
+/// A look at directory `dir` (look.zig's `.dir`): its pane, read again, or
+/// a new one, placed as a document is.
pub fn look(p: *Pardes, from: usize, dir: []const u8) void {
const name = (if (std.mem.endsWith(u8, dir, "/"))
p.gpa.dupe(u8, dir)
@@ -433,27 +433,6 @@ test "an exec in a directory pane runs in its directory, and its +Errors goes th
try testing.expect(named(p, try std.fmt.bufPrint(&errors_buf, "{s}{s}", .{ sub_name, config.errors_buffer })).id != null);
}
-test "DirLook terminal: a look at a directory opens a terminal there, no pane listing it" {
- if (comptime !pardes.hosted) return;
- var tmp = testing.tmpDir(.{});
- defer tmp.cleanup();
- var buf: [4096]u8 = undefined;
- const s = try session(&tmp, &buf);
- defer s.p.deinit();
- const p = s.p;
- try testing.expect(p.executeBuiltinLine(0, "DirLook terminal"));
- try testing.expectEqual(config.Runtime.DirLook.terminal, p.settings.dir_look);
- pardes.look.lookAt(p, 0, s.dir);
- p.sync();
- var name_buf: [4200]u8 = undefined;
- try testing.expectEqual(@as(usize, 0), named(p, try std.fmt.bufPrint(&name_buf, "{s}/", .{s.dir})).count);
- try testing.expect(p.panes[p.active].?.isTerminal());
- try testing.expectEqualStrings(s.dir, p.panes[p.active].?.cwdSlice());
- // Bare, it steps back to pane, the default.
- try testing.expect(p.executeBuiltinLine(0, "DirLook"));
- try testing.expectEqual(config.Runtime.DirLook.pane, p.settings.dir_look);
-}
-
test "over 9P a directory pane is a text pane whose name ends in /, its body the listing, ctl's isdir 1, and get reads it again" {
if (comptime !pardes.hosted) return;
const th = @import("ninep/testing.zig");