Add function call bang test.
@@ -143,3 +143,26 @@ fn test_functions_global_module() -> Result<(), Box<EvalAltResult>> {
Ok(())
}
+
+#[test]
+fn test_functions_bang() -> Result<(), Box<EvalAltResult>> {
+ let engine = Engine::new();
+
+ assert_eq!(
+ engine.eval::<INT>(
+ "
+ fn foo() {
+ hello + bar
+ }
+
+ let hello = 42;
+ let bar = 123;
+
+ foo!()
+ ",
+ )?,
+ 165
+ );
+
+ Ok(())
+}
