summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2009-04-30 14:43:55 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2009-04-30 14:43:55 -0400
commit28977d57ddbf4bc42139154f30b5e96a49e46894 (patch)
treee2e88effef276f807d8f5599aa4eb8c9b1839fde /tests
parentfe0742107983aeaea3db6715d2f71e2260ce05f1 (diff)
Megaform test
Diffstat (limited to 'tests')
-rw-r--r--tests/megaform.ur67
-rw-r--r--tests/megaform.urp3
-rw-r--r--tests/megaform.urs1
3 files changed, 71 insertions, 0 deletions
diff --git a/tests/megaform.ur b/tests/megaform.ur
new file mode 100644
index 00000000..2db2f678
--- /dev/null
+++ b/tests/megaform.ur
@@ -0,0 +1,67 @@
+fun handler'' ls =
+ case ls of
+ Nil => <xml/>
+ | Cons (r, ls) => <xml><li>{[r.C]}</li>{handler'' ls}</xml>
+
+fun handler' ls =
+ case ls of
+ Nil => <xml/>
+ | Cons (r, ls) => <xml><li>{[r.Sub.A]} <ul>{handler'' r.Sub.Sub2}</ul></li>{handler' ls}</xml>
+
+fun handler r = return <xml><body>
+ {[r.A]}
+ <ul>{handler' r.Sub}</ul>
+ {[r.C]}<br/>
+ {[r.Sub2.A]}<br/>
+ {handler'' r.Sub2.Nested}
+</body></xml>
+
+fun main () = return <xml><body>
+ <form>
+ <textbox{#A}/><br/>
+ <subforms{#Sub}>
+ <entry>
+ <subform{#Sub}>
+ <textbox{#A}/><br/>
+ <subforms{#Sub2}>
+ <entry>
+ <textbox{#C}/><br/>
+ </entry>
+
+ <entry>
+ <textbox{#C}/><br/>
+ </entry>
+ </subforms>
+ </subform>
+ </entry>
+
+ <entry>
+ <subform{#Sub}>
+ <textbox{#A}/><br/>
+ <subforms{#Sub2}>
+ <entry>
+ <textbox{#C}/><br/>
+ </entry>
+
+ <entry>
+ <textbox{#C}/><br/>
+ </entry>
+ </subforms>
+ </subform>
+ </entry>
+ </subforms>
+ <textbox{#C}/><br/>
+
+ <subform{#Sub2}>
+ <textbox{#A}/><br/>
+
+ <subforms{#Nested}>
+ <entry>
+ <textbox{#C}/>
+ </entry>
+ </subforms>
+ </subform><br/>
+
+ <submit action={handler}/>
+ </form>
+</body></xml>
diff --git a/tests/megaform.urp b/tests/megaform.urp
new file mode 100644
index 00000000..714ede1c
--- /dev/null
+++ b/tests/megaform.urp
@@ -0,0 +1,3 @@
+debug
+
+megaform
diff --git a/tests/megaform.urs b/tests/megaform.urs
new file mode 100644
index 00000000..6ac44e0b
--- /dev/null
+++ b/tests/megaform.urs
@@ -0,0 +1 @@
+val main : unit -> transaction page