summaryrefslogtreecommitdiffhomepage
path: root/tests/custom/04_modules/13_import_liveness
diff options
context:
space:
mode:
Diffstat (limited to 'tests/custom/04_modules/13_import_liveness')
-rw-r--r--tests/custom/04_modules/13_import_liveness29
1 files changed, 29 insertions, 0 deletions
diff --git a/tests/custom/04_modules/13_import_liveness b/tests/custom/04_modules/13_import_liveness
new file mode 100644
index 0000000..ca7ff35
--- /dev/null
+++ b/tests/custom/04_modules/13_import_liveness
@@ -0,0 +1,29 @@
+Imported bindings to exported module variables are live, they'll reflect
+every change to the exported variable values.
+
+-- Testcase --
+import { counter, count } from "./files/test.uc";
+
+print(counter, "\n");
+count();
+print(counter, "\n");
+-- End --
+
+-- File test.uc --
+let counter = 1;
+
+function count() {
+ counter++;
+}
+
+export { counter, count };
+-- End --
+
+-- Args --
+-R
+-- End --
+
+-- Expect stdout --
+1
+2
+-- End --