]> git.proxmox.com Git - rustc.git/blob - vendor/regex/tests/word_boundary_ascii.rs
New upstream version 1.53.0+dfsg1
[rustc.git] / vendor / regex / tests / word_boundary_ascii.rs
1 // ASCII word boundaries are completely oblivious to Unicode characters.
2 // For Unicode word boundaries, the tests are precisely inverted.
3 matiter!(ascii1, r"(?-u:\b)x(?-u:\b)", "áxβ", (2, 3));
4 matiter!(ascii2, r"(?-u:\B)x(?-u:\B)", "áxβ");
5 matiter!(ascii3, r"(?-u:\B)", "0\u{7EF5E}", (2, 2), (3, 3), (4, 4), (5, 5));
6
7 // We still get Unicode word boundaries by default in byte regexes.
8 matiter!(unicode1, r"\bx\b", "áxβ");
9 matiter!(unicode2, r"\Bx\B", "áxβ", (2, 3));