From aacb7f0b2473ca82dd8ee339ddba1f571473cce9 Mon Sep 17 00:00:00 2001 From: Stephen Chung Date: Sun, 4 Apr 2021 15:37:59 +0800 Subject: [PATCH] Ensure no interpolation for normal strings. --- tests/string.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/string.rs b/tests/string.rs index 9c72b27d..abcea364 100644 --- a/tests/string.rs +++ b/tests/string.rs @@ -325,6 +325,16 @@ fn test_string_interpolated() -> Result<(), Box> { "hello 42 worlds!" ); + assert_eq!( + engine.eval::( + r#" + let x = 40; + "hello ${x+2} worlds!" + "# + )?, + "hello ${x+2} worlds!" + ); + assert_eq!( engine.eval::( r"