From 5832e125807980f43e2b835c0181cba181e25fc0 Mon Sep 17 00:00:00 2001 From: gabriel Date: Wed, 15 May 2024 08:57:42 +0800 Subject: [PATCH] add test --- crates/nu-parser/tests/test_lex.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/crates/nu-parser/tests/test_lex.rs b/crates/nu-parser/tests/test_lex.rs index 07470a310e..eec7b14b43 100644 --- a/crates/nu-parser/tests/test_lex.rs +++ b/crates/nu-parser/tests/test_lex.rs @@ -187,6 +187,13 @@ fn lex_incomplete_quote() { assert!(matches!(err, ParseError::UnexpectedEof(v, _) if v == "'")); } +#[test] +fn lex_odd_string_interpolations() { + let file = b"$\"('\"')\""; + let output = lex(file, 0, &[], &[], true); + assert!(output.1.is_none()); +} + #[test] fn lex_comments_no_space() { // test for parses that contain tokens that normally introduce comments