From 74f6cb89e599e4655b8e732f869a998dbb709e21 Mon Sep 17 00:00:00 2001 From: Jeremy Wall Date: Sun, 22 Aug 2021 21:10:08 -0400 Subject: [PATCH] DEV: Add integration test for the mod.pkg func --- integration_tests/pkg_func_module.ucg | 13 +++++++++++++ integration_tests/pkg_func_module_test.ucg | 8 ++++++++ 2 files changed, 21 insertions(+) create mode 100644 integration_tests/pkg_func_module.ucg create mode 100644 integration_tests/pkg_func_module_test.ucg diff --git a/integration_tests/pkg_func_module.ucg b/integration_tests/pkg_func_module.ucg new file mode 100644 index 0000000..e19678d --- /dev/null +++ b/integration_tests/pkg_func_module.ucg @@ -0,0 +1,13 @@ +let t = import "std/testing.ucg"; + +let test_simple_mod = module { + arg = "value", +} => { + let value = mod.arg; +}; + +let pkg_func_mod = module { + arg = "value", +} => { + let value = mod.pkg().test_simple_mod{arg=mod.arg}.value; +}; \ No newline at end of file diff --git a/integration_tests/pkg_func_module_test.ucg b/integration_tests/pkg_func_module_test.ucg new file mode 100644 index 0000000..6db150f --- /dev/null +++ b/integration_tests/pkg_func_module_test.ucg @@ -0,0 +1,8 @@ +let t = import "std/testing.ucg"; + +let mod_under_test = import "./pkg_func_module.ucg"; + +assert t.equal{ + left = mod_under_test.pkg_func_mod{arg="foo"}.value, + right = "foo", +}; \ No newline at end of file