From 040620344ee8901582d944dbd04f8167f0a6cbc0 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Thu, 1 Oct 2026 10:23:36 -0300 Subject: `answer z` quotes `z`, a bare `name` says it names nothing, and `Repl klingon` is invalid (EINVAL), its message citing no doc path A refused answer quoted the word `answer`, not the choice refused. A `name` with nothing after it was an unknown control message. A Repl of no such language failed EIO with a pointer into the reference; it now says `invalid language` (EINVAL, here and through a mount) and how many more there are. A builtin's failure that says invalid anywhere is EINVAL, as 9ns reads it. Co-Authored-By: Claude Opus 5.5 --- src/pardes.zig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/pardes.zig') diff --git a/src/pardes.zig b/src/pardes.zig index 1659a94b..803686e0 100644 --- a/src/pardes.zig +++ b/src/pardes.zig @@ -1695,7 +1695,9 @@ test "a REPL bound for a language takes the exec made on a body in it; tags, Exe var want: [32]u8 = undefined; try std.testing.expect(th.logHas(p, try std.fmt.bufPrint(&want, "ask {d} repl a b\n", .{file.serial}))); // A choice not offered is refused, and the question stands. - try std.testing.expectEqual(ctlfs.E.INVAL, th.wr(p, ctlfs.Node.of(file.serial, .ctl), "answer z\n").errno()); + const refused = th.wr(p, ctlfs.Node.of(file.serial, .ctl), "answer z\n"); + try std.testing.expectEqual(ctlfs.E.INVAL, refused.errno()); + try std.testing.expect(std.mem.endsWith(u8, refused.reply.ename, " \"z\"")); try std.testing.expectEqual(Pane.Prompt.repl_choice, file.prompt); const answered = th.wr(p, ctlfs.Node.of(file.serial, .ctl), "answer a\n"); try std.testing.expectEqual(ctlfs.Status.ok, answered.reply.status); -- cgit v1.3