Add test to verify regex unicode codepoints work
This commit is contained in:
parent
8c845f29e0
commit
e5584f82d3
1 changed files with 4 additions and 1 deletions
|
|
@ -429,7 +429,7 @@ mod tests {
|
|||
.find(|t| t.characters.contains(c) && t.precedence >= result_precedence)
|
||||
{
|
||||
cursor.reset(states);
|
||||
end_char += 1;
|
||||
end_char += c.len_utf8();
|
||||
if is_separator {
|
||||
start_char = end_char;
|
||||
}
|
||||
|
|
@ -651,11 +651,14 @@ mod tests {
|
|||
Rule::pattern(r#"u{[0-9a-fA-F]+}"#),
|
||||
// Already-escaped curly braces
|
||||
Rule::pattern(r#"\{[ab]{3}\}"#),
|
||||
// Unicode codepoints
|
||||
Rule::pattern(r#"\u{1000A}"#),
|
||||
],
|
||||
separators: vec![],
|
||||
examples: vec![
|
||||
("u{1234} ok", Some((0, "u{1234}"))),
|
||||
("{aba}}", Some((1, "{aba}"))),
|
||||
("\u{1000A}", Some((2, "\u{1000A}"))),
|
||||
],
|
||||
},
|
||||
];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue