Fix bug with parsing improper module separator.

This commit is contained in:
Stephen Chung
2023-01-29 15:23:33 +08:00
parent 2c631daa07
commit 62696853b4
3 changed files with 69 additions and 21 deletions

View File

@@ -14,6 +14,13 @@ fn test_module() {
assert_eq!(module.get_var_value::<INT>("answer").unwrap(), 42);
}
#[test]
fn test_module_syntax() {
let engine = Engine::new();
assert!(engine.compile("abc.def::xyz").is_err());
assert!(engine.compile("abc.def::xyz()").is_err());
}
#[test]
fn test_module_sub_module() -> Result<(), Box<EvalAltResult>> {
let mut module = Module::new();