diff --git a/src/test/blocks/empty-variadic-no-auto-insert.xml b/src/test/blocks/empty-variadic-no-auto-insert.xml new file mode 100644 index 0000000..a7903b7 --- /dev/null +++ b/src/test/blocks/empty-variadic-no-auto-insert.xml @@ -0,0 +1 @@ +
\ No newline at end of file diff --git a/src/test/process.rs b/src/test/process.rs index ace12f4..486ca43 100644 --- a/src/test/process.rs +++ b/src/test/process.rs @@ -1589,6 +1589,28 @@ fn test_proc_explicit_to_string_cvt() { }); } +#[test] +fn test_proc_empty_variadic_no_auto_insert() { + let system = Rc::new(StdSystem::new_sync(BASE_URL.to_owned(), None, Config::default(), UtcOffset::UTC)); + let (mut env, _) = get_running_proc(&format!(include_str!("templates/generic-static.xml"), + globals = "", + fields = "", + funcs = include_str!("blocks/empty-variadic-no-auto-insert.xml"), + methods = "", + ), Settings::default(), system); + + run_till_term(&mut env, |mc, _, res| { + let expect = Value::from_json(mc, json!([ + [[], [], [], []], + [[], [], [], []], + [[], [], [], []], + [[], [], [], []], + [[], [], [], []], + ])).unwrap(); + assert_values_eq(&res.unwrap().0.unwrap(), &expect, 1e-5, "no auto insert"); + }); +} + #[test] fn test_proc_signed_zero() { let system = Rc::new(StdSystem::new_sync(BASE_URL.to_owned(), None, Config::default(), UtcOffset::UTC));