diff options
Diffstat (limited to 'tests/meta.ur')
-rw-r--r-- | tests/meta.ur | 48 |
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 <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 <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 <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 |