ucg/integration_tests/import_test.ucg
Jeremy Wall 54faeede5e FEATURE: Imports as expressions.
This is a breaking change for the language. However it makes a number of things
easier. Like importing specific symbols from a file.

adds: #28
2019-01-13 14:10:43 -06:00

16 lines
419 B
Plaintext

let shared = import "./libs/shared.ucg";
let test_mod = (import "./libs/shared.ucg").test_mod{};
let script = include str "./include_example.sh";
assert {
ok = script == test_mod.script,
desc = "include path worked from an imported module",
};
let imported = (import "./libs/test_import.ucg").val;
assert {
ok = imported == test_mod.imported,
desc = "include path worked from an imported module",
};