mirror of
https://github.com/tiffany352/rink-rs
synced 2024-11-10 13:44:15 +00:00
Add tests for Unicode escape sequences
This commit is contained in:
parent
dc82d2db5c
commit
94e2193287
1 changed files with 9 additions and 0 deletions
|
@ -476,3 +476,12 @@ fn test_escapes() {
|
|||
test("'ab\\'cd\\n\\t'", "1 ab'cd\n\t (ab'cd\n\t)");
|
||||
test("'x\\a'", "Expected term, got <Invalid escape sequence \\a>");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_unicode_escape() {
|
||||
test(
|
||||
"\\u9999999",
|
||||
"Expected term, got <Invalid unicode scalar: 9999999>",
|
||||
);
|
||||
test("0\\u2103", "273.15 kelvin (temperature)");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue