summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/crud1.html3
-rw-r--r--tests/formid.ur9
-rw-r--r--tests/formid.urs1
-rw-r--r--tests/qualrecord.ur7
-rw-r--r--tests/textarea_placeholder.ur12
-rw-r--r--tests/textarea_placeholder.urs1
6 files changed, 31 insertions, 2 deletions
diff --git a/tests/crud1.html b/tests/crud1.html
index 92cd1942..b1f34b54 100644
--- a/tests/crud1.html
+++ b/tests/crud1.html
@@ -24,8 +24,7 @@
</table>
<br /><hr /><br />
-
- <form method="post" action="/Demo/Crud1/create">
+<form method="post" action="/Demo/Crud1/create">
<li> A: <input type="text" name="A" /></li>
<li> B: <input type="text" name="B" /></li>
<li> C: <input type="text" name="C" /></li>
diff --git a/tests/formid.ur b/tests/formid.ur
new file mode 100644
index 00000000..c9e3317d
--- /dev/null
+++ b/tests/formid.ur
@@ -0,0 +1,9 @@
+fun handler () = return <xml></xml>
+
+fun main () : transaction page =
+ id <- fresh;
+ return <xml><body>
+ <form id={id}>
+ <submit action={handler}/>
+ </form>
+ </body></xml>
diff --git a/tests/formid.urs b/tests/formid.urs
new file mode 100644
index 00000000..6ac44e0b
--- /dev/null
+++ b/tests/formid.urs
@@ -0,0 +1 @@
+val main : unit -> transaction page
diff --git a/tests/qualrecord.ur b/tests/qualrecord.ur
new file mode 100644
index 00000000..4db64e5f
--- /dev/null
+++ b/tests/qualrecord.ur
@@ -0,0 +1,7 @@
+structure M = struct
+ con the_best_name = #Wiggles
+ con the_runner_up = #Beppo
+end
+
+val x : {M.the_best_name : int, A : int, M.the_runner_up : int} =
+ {M.the_best_name = 8, A = 9, M.the_runner_up = 10}
diff --git a/tests/textarea_placeholder.ur b/tests/textarea_placeholder.ur
new file mode 100644
index 00000000..b328f838
--- /dev/null
+++ b/tests/textarea_placeholder.ur
@@ -0,0 +1,12 @@
+fun lame _ = return <xml/>
+
+fun main () =
+ s <- source "";
+ return <xml><body>
+ <form>
+ <textarea{#Text} placeholder="Type something here."/>
+ <submit action={lame}/>
+ </form>
+
+ <ctextarea source={s} placeholder="Absolutely don't type something here."/>
+ </body></xml>
diff --git a/tests/textarea_placeholder.urs b/tests/textarea_placeholder.urs
new file mode 100644
index 00000000..6ac44e0b
--- /dev/null
+++ b/tests/textarea_placeholder.urs
@@ -0,0 +1 @@
+val main : unit -> transaction page