diff options
Diffstat (limited to 'src/ninep')
| -rw-r--r-- | src/ninep/ctl.zig | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/ninep/ctl.zig b/src/ninep/ctl.zig index 92342525..4abb6fcd 100644 --- a/src/ninep/ctl.zig +++ b/src/ninep/ctl.zig @@ -2300,6 +2300,14 @@ test "Back and Forward over a closed file's entries: one reopen is that file's p try testing.expectEqual(c_serial, p.panes[p.active].?.serial); } +test "/recent shows a name as /index does, a newline in it escaped" { + const p = try withFile(testing.allocator, "x\n"); + defer p.deinit(); + p.recent.opened(p.recentGpa(), "/tmp/a\nb\\c"); + const text = rd(p, @intFromEnum(tree.TopFile.recent), 0, 8192).bytes; + try testing.expect(std.mem.indexOf(u8, text, "closed /tmp/a\\nb\\\\c\n") != null); +} + test "a remembered place is clamped to the file as it is now, its selection's two ends kept where they fit" { const p = try withFile(testing.allocator, "x\n"); defer p.deinit(); |
