summaryrefslogtreecommitdiff
path: root/tests/parseInt.ur
diff options
context:
space:
mode:
Diffstat (limited to 'tests/parseInt.ur')
-rw-r--r--tests/parseInt.ur9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/parseInt.ur b/tests/parseInt.ur
new file mode 100644
index 0000000..2d906fc
--- /dev/null
+++ b/tests/parseInt.ur
@@ -0,0 +1,9 @@
+fun main () : transaction page =
+ s <- source "";
+ return <xml><body>
+ <ctextbox source={s}/>
+ <button onclick={n <- get s;
+ case read n of
+ None => alert "Invalid"
+ | Some n => alert (show (n + 1))}/>
+ </body></xml>