summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adam@chlipala.net>2014-11-16 15:03:29 -0500
committerGravatar Adam Chlipala <adam@chlipala.net>2014-11-16 15:03:29 -0500
commit049d3500132b56ac2429a8a6ee0cc5ba1fbaae5a (patch)
tree931bf0290409a58507cc9fabc2c938c0843c0468 /tests
parent86df1742d90c9ae13843188c0772554ed2eaa666 (diff)
Textual HTML5 AJAX widgets
Diffstat (limited to 'tests')
-rw-r--r--tests/ctextbox.urp1
-rw-r--r--tests/html5_cforms.ur29
2 files changed, 30 insertions, 0 deletions
diff --git a/tests/ctextbox.urp b/tests/ctextbox.urp
index d5cb5e9f..5c6c5df8 100644
--- a/tests/ctextbox.urp
+++ b/tests/ctextbox.urp
@@ -1,4 +1,5 @@
debug
allow url http://localhost/*
+rewrite url Ctextbox/*
ctextbox
diff --git a/tests/html5_cforms.ur b/tests/html5_cforms.ur
new file mode 100644
index 00000000..a62dbf23
--- /dev/null
+++ b/tests/html5_cforms.ur
@@ -0,0 +1,29 @@
+fun dn [a] (_ : show a) (x : source a) : xbody = <xml>
+ <dyn signal={v <- signal x; return (txt v)}/>
+</xml>
+
+fun main () : transaction page =
+ a <- source "";
+ b <- source True;
+ c <- source "a@b";
+ d <- source "";
+ e <- source "";
+ f <- source "";
+
+ return <xml><body>
+ <ctextbox source={a}/>
+ <ccheckbox source={b}/>
+ <cemail source={c}/>
+ <curl source={d}/>
+ <ctel source={e}/>
+ <csearch source={f}/>
+
+ <hr/>
+
+ {dn a};
+ {dn b};
+ {dn c};
+ {dn d};
+ {dn e};
+ {dn f}
+ </body></xml>