summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adam@chlipala.net>2012-07-25 08:20:15 -0400
committerGravatar Adam Chlipala <adam@chlipala.net>2012-07-25 08:20:15 -0400
commit041a250016b69a70a1fa1ab91ef3c2e61908a9db (patch)
tree5bad8880a0a764f7d77e14b382ddb07ec268fb18 /tests
parent9e627bd5a88b41254fc10955f7def21fa1f329fc (diff)
Change 'spawn' implementation to allow blocking within <active code>
Diffstat (limited to 'tests')
-rw-r--r--tests/activeBlock.ur10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/activeBlock.ur b/tests/activeBlock.ur
new file mode 100644
index 00000000..5560edda
--- /dev/null
+++ b/tests/activeBlock.ur
@@ -0,0 +1,10 @@
+fun main () : transaction page = return <xml><body>
+ <active code={s <- source ""; return <xml>
+ <dyn signal={s <- signal s; return (txt s)}/>
+ <button onclick={fn _ => set s "Hi!"}/>
+ </xml>}/>
+
+ <active code={sleep 1; return <xml>Hi!</xml>}/>
+
+ <active code={spawn (sleep 1; alert "Hi!"); return <xml>Success</xml>}/>
+</body></xml>