summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adam@chlipala.net>2011-02-10 08:46:46 -0500
committerGravatar Adam Chlipala <adam@chlipala.net>2011-02-10 08:46:46 -0500
commit98271e4a9f570230175f68417d1aa91f6caf7cd8 (patch)
tree189de6f2ff8814313cf52d2fafc2a2d266806c26 /tests
parent6ac0f0338084612d367def5b8518bd4514c3f9a4 (diff)
Fix some cookie-related bugs in MonoReduce
Diffstat (limited to 'tests')
-rw-r--r--tests/cookieClear.ur19
-rw-r--r--tests/cookieClear.urp1
-rw-r--r--tests/cookieClear.urs1
3 files changed, 21 insertions, 0 deletions
diff --git a/tests/cookieClear.ur b/tests/cookieClear.ur
new file mode 100644
index 00000000..70829808
--- /dev/null
+++ b/tests/cookieClear.ur
@@ -0,0 +1,19 @@
+cookie c : int
+
+fun setit () =
+ setCookie c {Value = 13,
+ Expires = None,
+ Secure = False};
+ return <xml/>
+
+fun doit () =
+ ro <- getCookie c;
+ clearCookie c;
+ case ro of
+ None => return <xml>None</xml>
+ | Some v => return <xml>Some {[v]}</xml>
+
+fun main () = return <xml><body>
+ <form><submit value="Set it!" action={setit}/></form>
+ <form><submit value="Get busy!" action={doit}/></form>
+</body></xml>
diff --git a/tests/cookieClear.urp b/tests/cookieClear.urp
new file mode 100644
index 00000000..c5a1c837
--- /dev/null
+++ b/tests/cookieClear.urp
@@ -0,0 +1 @@
+cookieClear
diff --git a/tests/cookieClear.urs b/tests/cookieClear.urs
new file mode 100644
index 00000000..6ac44e0b
--- /dev/null
+++ b/tests/cookieClear.urs
@@ -0,0 +1 @@
+val main : unit -> transaction page