diff --git a/tests/options.rs b/tests/options.rs index 09a79a3c..01574e74 100644 --- a/tests/options.rs +++ b/tests/options.rs @@ -16,11 +16,14 @@ fn test_options() -> Result<(), Box> { assert!(engine.compile("let x = { let z = 0; z + 1 };").is_err()); - engine.compile("let x = || 42;")?; + #[cfg(not(feature = "no_function"))] + { + engine.compile("let x = || 42;")?; - engine.set_allow_anonymous_fn(false); + engine.set_allow_anonymous_fn(false); - assert!(engine.compile("let x = || 42;").is_err()); + assert!(engine.compile("let x = || 42;").is_err()); + } engine.compile("while x > y { foo(z); }")?;