account for comment delimiters in strings

This commit is contained in:
Ava Apples Affine 2023-06-08 17:13:45 -07:00
parent 0a01f9178c
commit 7d2fe51709
2 changed files with 10 additions and 0 deletions

View file

@ -32,6 +32,12 @@ mod lex_tests {
assert_eq!(lex(&document).unwrap().to_string(), document);
}
#[test]
fn test_comment_delim_in_str() {
let document = String::from("('#')");
assert_eq!(lex(&document).unwrap().to_string(), document);
}
#[test]
fn test_empty_string() {
let document = String::from("('')");