diff options
Diffstat (limited to 'tests/cookie.ur')
-rw-r--r-- | tests/cookie.ur | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/tests/cookie.ur b/tests/cookie.ur index cb4f8854..bef45a4f 100644 --- a/tests/cookie.ur +++ b/tests/cookie.ur @@ -1,8 +1,22 @@ cookie c : string -fun main () : transaction page = - setCookie c "Hi"; +fun other () = so <- getCookie c; case so of None => return <xml>No cookie</xml> | Some s => return <xml>Cookie: {[s]}</xml> + +structure M = struct + fun aux () = + setCookie c "Hi"; + so <- getCookie c; + case so of + None => return <xml>No cookie</xml> + | Some s => return <xml><body>Cookie: {[s]}<br/> + <a link={other ()}>Other</a></body></xml> +end + +fun main () : transaction page = return <xml><body> + <a link={other ()}>Other</a><br/> + <a link={M.aux ()}>Aux</a><br/> +</body></xml> |