summaryrefslogtreecommitdiff
path: root/tests/meta.ur
diff options
context:
space:
mode:
authorGravatar Benjamin Barenblat <bbaren@mit.edu>2016-05-30 17:33:12 -0400
committerGravatar Benjamin Barenblat <bbaren@mit.edu>2016-05-30 17:33:12 -0400
commita3e471e933945dcfb54873cb20c691a193b55671 (patch)
tree70ba7ffe26a589f0b97aec7016c171261c54c9e2 /tests/meta.ur
parent5ca6148aaf7b930a8868d0543f1a307d40532243 (diff)
parent359c1ca68f97181dada92e28440c7336fc88fff5 (diff)
Merge branch 'upstream' into dfsg_clean20160515+dfsg
Diffstat (limited to 'tests/meta.ur')
-rw-r--r--tests/meta.ur48
1 files changed, 48 insertions, 0 deletions
diff --git a/tests/meta.ur b/tests/meta.ur
new file mode 100644
index 00000000..f8d12183
--- /dev/null
+++ b/tests/meta.ur
@@ -0,0 +1,48 @@
+fun main () : transaction page =
+ let
+ fun handler r = return <xml>
+ <head>
+ <meta name={blessMeta r.Nam} content={r.Content}/>
+ <title>Testing &lt;meta> tags</title>
+ </head>
+ <body>
+ <p>Did it work?</p>
+ </body>
+ </xml>
+
+ fun handler2 r =
+ case checkMeta r.Nam of
+ None => error <xml>Oh, that name won't do at all.</xml>
+ | Some name =>
+ return <xml>
+ <head>
+ <meta name={name} content={r.Content}/>
+ <title>Testing &lt;meta> tags</title>
+ </head>
+ <body>
+ <p>Did it work?</p>
+ </body>
+ </xml>
+ in
+ return <xml>
+ <head>
+ <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
+ <title>Testing &lt;meta> tags</title>
+ </head>
+ <body>
+ <p>Did it work?</p>
+
+ <form>
+ Name: <textbox{#Nam}/><br/>
+ Content: <textbox{#Content}/><br/>
+ <submit action={handler}/>
+ </form>
+
+ <form>
+ Name: <textbox{#Nam}/><br/>
+ Content: <textbox{#Content}/><br/>
+ <submit action={handler2}/>
+ </form>
+ </body>
+ </xml>
+ end