diff options
| author | Gabriel Schneider <[email protected]> | 2026-10-01 10:23:36 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-10-01 10:36:28 -0300 |
| commit | 040620344ee8901582d944dbd04f8167f0a6cbc0 (patch) | |
| tree | 9a793361f6647f2b3d1ec2544838b79e31411ac0 /src/pardes.zig | |
| parent | 3f76d4d88245e94a266c24dc23bbba78a00570a3 (diff) | |
| download | pardes-040620344ee8901582d944dbd04f8167f0a6cbc0.tar.gz pardes-040620344ee8901582d944dbd04f8167f0a6cbc0.zip | |
`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 <[email protected]>
Diffstat (limited to 'src/pardes.zig')
| -rw-r--r-- | src/pardes.zig | 4 |
1 files changed, 3 insertions, 1 deletions
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); |
