summaryrefslogtreecommitdiff
path: root/src/ninep
diff options
context:
space:
mode:
Diffstat (limited to 'src/ninep')
-rw-r--r--src/ninep/ctl.zig11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/ninep/ctl.zig b/src/ninep/ctl.zig
index ec7cb3bc..89549933 100644
--- a/src/ninep/ctl.zig
+++ b/src/ninep/ctl.zig
@@ -2471,10 +2471,7 @@ test "/index shows a name as the log does: a newline in it is \\n, a control byt
// Its tag never carries the raw newline either.
const tag = rd(p, Node.of(serialOf(p), .tag), 0, 4096).bytes;
try testing.expect(std.mem.indexOf(u8, tag, "/tmp/two\\nlines") != null);
- // A backslash of the name's own is doubled: `\n` written in a name
- // reads back unlike a newline.
- p.setCwd(term, "/tmp/back\\nslash");
- try testing.expect(std.mem.indexOf(u8, rd(p, @backingInt(tree.TopFile.index), 0, 4096).bytes, "/tmp/back\\\\nslash") != null);
+ // A name's own backslash doubled is test/behaviour/other_files.zig's.
}
test "a column takes panes until their documented minimums fill it, not until none can be halved" {
@@ -2525,9 +2522,11 @@ test "a new file saved shows in /recent, open, while it is" {
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");
+ // A backslash doubled is test/behaviour/other_files.zig's; a 9P name
+ // write cannot hold a newline.
+ p.recent.opened(p.recentGpa(), "/tmp/a\nb");
const text = rd(p, @backingInt(tree.TopFile.recent), 0, 8192).bytes;
- try testing.expect(std.mem.indexOf(u8, text, "closed /tmp/a\\nb\\\\c\n") != null);
+ try testing.expect(std.mem.indexOf(u8, text, "closed /tmp/a\\nb\n") != null);
}
test "size is monotonic: growing is never refused, and a size once taken is taken again" {