Fix tests.

This commit is contained in:
Stephen Chung
2022-08-05 23:45:40 +08:00
parent d8532b48b6
commit d9ffac17fa
3 changed files with 4 additions and 7 deletions

View File

@@ -105,8 +105,7 @@ fn test_options_strict_var() -> Result<(), Box<EvalAltResult>> {
#[cfg(not(feature = "no_function"))]
{
assert_eq!(
engine
.eval_with_scope::<INT>(&mut scope, "fn foo(z) { y + z } let f = foo; f.call(x)")?,
engine.eval_with_scope::<INT>(&mut scope, "fn foo(z) { z } let f = foo; call(f, x)")?,
42
);
assert!(engine.compile("let f = |y| x * y;").is_err());