diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-17 01:42:25 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-17 12:15:01 -0300 |
| commit | b3d32656413734952bc918c2d4cfd12fede6c214 (patch) | |
| tree | 04386fab10b9ed803ec31251cb733cc32852390a /src/regexp.zig | |
| parent | 4a33b8d2bd409d4a06205f28e0eb1b4cdaf49889 (diff) | |
| parent | e6e81a6bc544c5ab5a47c21d85e6868020031abb (diff) | |
| download | pardes-b3d32656413734952bc918c2d4cfd12fede6c214.tar.gz pardes-b3d32656413734952bc918c2d4cfd12fede6c214.zip | |
integration: the diff viewer on general mechanisms, and the plumber's first phase, together
A merge of diff-lib and plumber-1; the changelog keeps both sides' entries; core-test 984/984 on tui, the process suite's tree cases pass (fs-help.txt holds both the rows and the plumb lines in its 45).
Co-Authored-By: Claude Fable 5.2 <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
Diffstat (limited to 'src/regexp.zig')
| -rw-r--r-- | src/regexp.zig | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/regexp.zig b/src/regexp.zig index 7bcbceff..87fc51d6 100644 --- a/src/regexp.zig +++ b/src/regexp.zig @@ -595,6 +595,14 @@ test "a \\x without two hex digits is refused, not handed to mvzr to panic on" { try std.testing.expectEqual(@as(usize, 1), (try rx.find("xA", 0, 1, 2)).?.start); } +test "a class's range may end at \\xff: UTF-8's high bytes as one class" { + var rx = try Regex.compile("[a-z\\x80-\\xff]+"); + const text = "-- café --"; + const m = (try rx.find(text, 0, text.len, text.len)).?; + try std.testing.expectEqualStrings("café", text[m.start..m.end]); + _ = try Regex.compile("[\\xff-\\xff]"); +} + test "a repeat inside a group gives back to what follows the group" { const Case = struct { pat: []const u8, text: []const u8, start: usize, end: usize }; for ([_]Case{ |
