Fix no_index build.

This commit is contained in:
Stephen Chung
2021-04-05 18:32:20 +08:00
parent f5d3a0ef4f
commit a3ee0f4245
2 changed files with 13 additions and 7 deletions

View File

@@ -38,8 +38,14 @@ fn test_map_indexing() -> Result<(), Box<EvalAltResult>> {
engine.eval::<()>("let y = #{a: 1, b: 2, c: 3}; y.z")?;
#[cfg(not(feature = "no_index"))]
assert_eq!(
engine.eval::<INT>(r#"let y = #{`a\nb`: 1}; y["a\\nb"]"#)?,
engine.eval::<INT>(
r#"
let y = #{`a
b`: 1}; y["a\nb"]
"#
)?,
1
);