summaryrefslogtreecommitdiff
path: root/tests/treeDyn.ur
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adam@chlipala.net>2011-05-12 17:14:13 -0400
committerGravatar Adam Chlipala <adam@chlipala.net>2011-05-12 17:14:13 -0400
commitb2a63d5b664c052d672d8cbde8cbb351b292e4c5 (patch)
tree7b127a36fbb5427c13faebb5351d949d7feea79d /tests/treeDyn.ur
parente76ab5cc70d54021d19c9aabbb632c922297dda6 (diff)
Escape less-than in JavaScript strings
Diffstat (limited to 'tests/treeDyn.ur')
-rw-r--r--tests/treeDyn.ur18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/treeDyn.ur b/tests/treeDyn.ur
new file mode 100644
index 00000000..1d58cca5
--- /dev/null
+++ b/tests/treeDyn.ur
@@ -0,0 +1,18 @@
+table t : {Id : int, Parent : option int}
+
+fun recurse (root : option int) =
+ queryX' (SELECT * FROM t WHERE {eqNullable' (SQL t.Parent) root})
+ (fn r =>
+ children <- recurse (Some r.T.Id);
+ (*s <- source False;*)
+ return <xml>
+ <dyn signal={(*v <- signal s;
+ if v then*)
+ return <xml><b>HI</b>{children}<b>BYE</b></xml>
+ (*else
+ return <xml/>*)}/>
+ </xml>)
+
+fun main () =
+ x <- recurse None;
+ return <xml><body>{x}</body></xml>