From 86013c13e5847e67571e99c7b20a5dc70f256da3 Mon Sep 17 00:00:00 2001 From: Edgar Luque Date: Thu, 14 Dec 2023 11:06:46 +0100 Subject: [PATCH] string --- src/main.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main.rs b/src/main.rs index 7432601..36ade0a 100644 --- a/src/main.rs +++ b/src/main.rs @@ -65,5 +65,9 @@ mod test { check("-0.1", ast::Constant::Number(ast::Number::Real("-0.1"))); check("2.2", ast::Constant::Number(ast::Number::Real("2.2"))); check("1e10", ast::Constant::Number(ast::Number::Real("1e10"))); + + + check(r#""hello world""#, ast::Constant::String("\"hello world\"")); + check(r#""\"hell\"o world""#, ast::Constant::String("\"\\\"hell\\\"o world\"")); } }