From 236d71cd4e63d1cf044bd8f5a131e25dabfe325e Mon Sep 17 00:00:00 2001 From: Piotr Czarnecki Date: Fri, 24 Nov 2023 16:19:00 +0100 Subject: [PATCH] Add test for nested raw strings --- compiler/noirc_frontend/src/parser/parser.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/compiler/noirc_frontend/src/parser/parser.rs b/compiler/noirc_frontend/src/parser/parser.rs index ec480734b77..7f0bf6376c6 100644 --- a/compiler/noirc_frontend/src/parser/parser.rs +++ b/compiler/noirc_frontend/src/parser/parser.rs @@ -2590,6 +2590,12 @@ mod test { Case { source: r###" r#"foo" # "###, expect: "(none)", errors: 2 }, // after identifier Case { source: r###" bar#"foo"# "###, expect: "plain::bar", errors: 2 }, + // nested + Case { + source: r###"r##"foo r#"bar"# r"baz" ### bye"##"###, + expect: r###"r##"foo r#"bar"# r"baz" ### bye"##"###, + errors: 0, + }, ]; check_cases_with_errors(&cases[..], expression());