diff options
| author | Gabriel Schneider <[email protected]> | 2026-09-29 12:35:40 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-10-01 00:12:16 -0300 |
| commit | 2d9f40667197ac775d5215ffd164c800f83cab4c (patch) | |
| tree | 7db6fb0ead682803ad406909c3c2cb81def335d0 /src/sam_edit.zig | |
| parent | d8b35f18817faaba340059cc2bd88ab3b3bc919b (diff) | |
| download | pardes-2d9f40667197ac775d5215ffd164c800f83cab4c.tar.gz pardes-2d9f40667197ac775d5215ffd164c800f83cab4c.zip | |
A pattern with a newline and an anchor mvzr would misread is refused EINVAL, as the doc says
Its words named no malformed input, so 9ns read the refusal as EIO, and Edit's failed EIO directly. It now says bad regular expression: ..., and Edit's failure with those words is EINVAL too.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'src/sam_edit.zig')
| -rw-r--r-- | src/sam_edit.zig | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sam_edit.zig b/src/sam_edit.zig index cd2998ef..a88728aa 100644 --- a/src/sam_edit.zig +++ b/src/sam_edit.zig @@ -735,7 +735,7 @@ test "an Edit that fails halfway changes nothing, and says why in acme's words" .{ "w /tmp/x", "w is not supported in pardes" }, .{ ",s/(a)/\\1/", "no \\1: mvzr keeps no submatches" }, .{ "1 m 1,2", "move overlaps itself" }, - .{ ",x/(^|\\n)foo/d", "in a pattern with \\n, ^ can only come first and $ only just before a \\n" }, + .{ ",x/(^|\\n)foo/d", "bad regular expression: in a pattern with \\n, ^ can only come first and $ only just before a \\n" }, }) |c| { var why: Why = .{}; try std.testing.expectError(error.Edit, run(arena_state.allocator(), "foo a\nfoo\n", .{}, "t", c[0], &why)); |
