summaryrefslogtreecommitdiff
path: root/src/ninep/tree.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-09-29 09:16:54 -0300
committerGabriel Schneider <[email protected]>2026-10-01 00:12:16 -0300
commitc2cc0d9f212fdb285a11cbceaa16a30ad3236743 (patch)
treefe339b453de19d1d7aad0f3f862c99772212c1d9 /src/ninep/tree.zig
parent49d5bf5ebfe4a84070b7eac1e9d8ac52e1cc45fd (diff)
downloadpardes-c2cc0d9f212fdb285a11cbceaa16a30ad3236743.tar.gz
pardes-c2cc0d9f212fdb285a11cbceaa16a30ad3236743.zip
An err record's reason that names its file already is not prefixed twice
A refused look logged `err N look: look: no space for a pane...`: the reason began with the file's name, and the record put it before it again. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'src/ninep/tree.zig')
-rw-r--r--src/ninep/tree.zig3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/ninep/tree.zig b/src/ninep/tree.zig
index c089c31d..9d2027bf 100644
--- a/src/ninep/tree.zig
+++ b/src/ninep/tree.zig
@@ -1470,6 +1470,9 @@ test "at the pane cap, pane/new, look and New each say so, and look reads back e
const looked = th.wr(p, look_node, try std.fmt.bufPrint(&line, "{s}/f.txt\n", .{dir}));
try testing.expect(looked.errno() != 0);
try testing.expect(std.mem.indexOf(u8, looked.reply.ename, said) != null);
+ // Its err record names the file once: `look: no space...`.
+ try testing.expect(th.logHas(p, "look: no space"));
+ try testing.expect(!th.logHas(p, "look: look:"));
try testing.expectEqualStrings("", th.rd(p, look_node, 0, 64).bytes);
// New from a pane's ctl fails as well.
const ctl_node = Node.of(p.panes[0].?.serial, .ctl);