diff options
author | Adam Chlipala <adam@chlipala.net> | 2018-10-19 15:55:17 -0400 |
---|---|---|
committer | Adam Chlipala <adam@chlipala.net> | 2018-10-19 15:55:17 -0400 |
commit | d800556bd50ecb78c21343a288f9475b8b870162 (patch) | |
tree | d031992d3d4d6809969b712ba44ace1eaea667e3 /tests | |
parent | e798117b42c5df30d1b3778d6414467e8e7b1e04 (diff) |
Just return None rather than crashing, when trying to read cookies within tasks (closes #143)
Diffstat (limited to 'tests')
-rw-r--r-- | tests/task_cookie.ur | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/task_cookie.ur b/tests/task_cookie.ur new file mode 100644 index 00000000..39f49b0a --- /dev/null +++ b/tests/task_cookie.ur @@ -0,0 +1,9 @@ +cookie myCookie: {Value: string} + +fun main (): transaction page = return <xml></xml> + +task initialize = fn () => + c <- getCookie myCookie; + case c of + None => debug "No cookie" + | Some {Value = v} => debug ("Cookie value: " ^ v) |