Add better comment skipping (#359)

This commit is contained in:
JT
2021-11-22 07:13:09 +13:00
committed by GitHub
parent d30dfc63c4
commit 143855b662
6 changed files with 58 additions and 32 deletions

View File

@ -1120,3 +1120,26 @@ fn config_var_2() -> TestResult {
"40.0 KB",
)
}
#[test]
fn comment_skipping_1() -> TestResult {
run_test(
r#"let x = {
y: 20
# foo
}; $x.y"#,
"20",
)
}
#[test]
fn comment_skipping_2() -> TestResult {
run_test(
r#"let x = {
y: 20
# foo
z: 40
}; $x.z"#,
"40",
)
}