Add support for escape characters, make nuon a JSON superset (#4706)

* WIP

* Finish adding escape support in strings

* Try to fix windows
This commit is contained in:
JT
2022-03-03 13:14:03 -05:00
committed by GitHub
parent 13f2048ffb
commit 7d0531d270
10 changed files with 271 additions and 78 deletions

View File

@ -329,3 +329,13 @@ fn block_arity_check2() -> TestResult {
fn block_arity_check3() -> TestResult {
fail_test(r#"ls | each { |x, y| 1}"#, "expected 1 block parameter")
}
#[test]
fn string_escape() -> TestResult {
run_test(r#""\u015B""#, "ś")
}
#[test]
fn string_escape_interpolation() -> TestResult {
run_test(r#"$"\u015B(char hamburger)abc""#, "ś≡abc")
}