Ensure no interpolation for normal strings.

This commit is contained in:
Stephen Chung 2021-04-04 15:37:59 +08:00
parent 20aaf1826a
commit aacb7f0b24

View File

@ -325,6 +325,16 @@ fn test_string_interpolated() -> Result<(), Box<EvalAltResult>> {
"hello 42 worlds!"
);
assert_eq!(
engine.eval::<String>(
r#"
let x = 40;
"hello ${x+2} worlds!"
"#
)?,
"hello ${x+2} worlds!"
);
assert_eq!(
engine.eval::<String>(
r"