systemd-cron-next/vendor/regex/tests/word_boundary_ascii.rs
2024-11-12 15:03:58 +03:00

9 lines
378 B
Rust

// ASCII word boundaries are completely oblivious to Unicode characters.
// For Unicode word boundaries, the tests are precisely inverted.
matiter!(ascii1, r"\bx\b", "áxβ", (2, 3));
matiter!(ascii2, r"\Bx\B", "áxβ");
// We can still get Unicode mode in byte regexes.
matiter!(unicode1, r"(?u:\b)x(?u:\b)", "áxβ");
matiter!(unicode2, r"(?u:\B)x(?u:\B)", "áxβ", (2, 3));