Merge branch 'bug-fixes'

This commit is contained in:
Stephen Chung
2021-09-03 10:19:58 +08:00
3 changed files with 23 additions and 3 deletions

View File

@@ -51,6 +51,18 @@ fn test_try_catch() -> Result<(), Box<EvalAltResult>> {
42
);
assert_eq!(
engine.eval::<INT>(
"
let err = 123;
let x = 0;
try { throw 42; } catch(err) { print(err); }
err
"
)?,
123
);
assert_eq!(
engine.eval::<INT>(
"