aboutsummaryrefslogtreecommitdiff
path: root/tests/icon/accept/bound_global.zc
diff options
context:
space:
mode:
Diffstat (limited to 'tests/icon/accept/bound_global.zc')
-rw-r--r--tests/icon/accept/bound_global.zc13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/icon/accept/bound_global.zc b/tests/icon/accept/bound_global.zc
new file mode 100644
index 0000000..f49a76b
--- /dev/null
+++ b/tests/icon/accept/bound_global.zc
@@ -0,0 +1,13 @@
+include rt;
+include run;
+include icon;
+int counter = 6;
+fn main() {
+ let q = run.tokens("counter += 4; return counter;");
+ let frame = icon.begin(q);
+ rt.put_n(icon.bind_global(frame, "counter")); rt.put_c(' ');
+ icon.resume(frame, 3);
+ rt.put_n(counter); rt.put_c(' '); rt.put_n(icon.result(frame)); rt.put_c(10);
+ icon.close(d*frame);
+ return 0;
+}