Add lexer test for empty string interpolation

This commit is contained in:
elkowar 2022-08-09 12:41:02 +02:00
parent aac4c3aef4
commit 9da37b8bd0
No known key found for this signature in database
GPG key ID: E321AD71B1D1F27F
2 changed files with 7 additions and 0 deletions

View file

@ -317,5 +317,6 @@ mod test {
weird_nesting => v!(r#" weird_nesting => v!(r#"
"${ {"hi": "ho"}.hi }".hi "${ {"hi": "ho"}.hi }".hi
"#), "#),
empty_interpolation => v!(r#""${}""#),
} }
} }

View file

@ -0,0 +1,6 @@
---
source: crates/simplexpr/src/parser/lexer.rs
assertion_line: 306
expression: "v!(r#\"\"${}\"\"#)"
---
(0, StringLit([(0, Literal(""), 3), (3, Interp([]), 3), (3, Literal(""), 5)]), 5)