diff --git a/tests/functions.rs b/tests/functions.rs index e0b4af5a..3132907d 100644 --- a/tests/functions.rs +++ b/tests/functions.rs @@ -143,3 +143,26 @@ fn test_functions_global_module() -> Result<(), Box> { Ok(()) } + +#[test] +fn test_functions_bang() -> Result<(), Box> { + let engine = Engine::new(); + + assert_eq!( + engine.eval::( + " + fn foo() { + hello + bar + } + + let hello = 42; + let bar = 123; + + foo!() + ", + )?, + 165 + ); + + Ok(()) +}