]> git.proxmox.com Git - rustc.git/blame - vendor/regex-1.4.3/tests/word_boundary_ascii.rs
New upstream version 1.54.0+dfsg1
[rustc.git] / vendor / regex-1.4.3 / tests / word_boundary_ascii.rs
CommitLineData
94b46f34
XL
1// ASCII word boundaries are completely oblivious to Unicode characters.
2// For Unicode word boundaries, the tests are precisely inverted.
3matiter!(ascii1, r"(?-u:\b)x(?-u:\b)", "áxβ", (2, 3));
4matiter!(ascii2, r"(?-u:\B)x(?-u:\B)", "áxβ");
5matiter!(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.
8matiter!(unicode1, r"\bx\b", "áxβ");
9matiter!(unicode2, r"\Bx\B", "áxβ", (2, 3));