summaryrefslogtreecommitdiff
path: root/tests/cffi.ur
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2009-05-02 18:41:21 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2009-05-02 18:41:21 -0400
commit5bec72c1ee13e48a9e11c3c1b924020436c827fe (patch)
tree2cdc71a8815189be0d6ee18e920b57dad252c2b7 /tests/cffi.ur
parent2d37bf0ef2c634819293a191eff9799934b08346 (diff)
FFI transactionals
Diffstat (limited to 'tests/cffi.ur')
-rw-r--r--tests/cffi.ur15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/cffi.ur b/tests/cffi.ur
index 039eac55..bcb9944c 100644
--- a/tests/cffi.ur
+++ b/tests/cffi.ur
@@ -8,7 +8,22 @@ fun effect () =
<button value="Either" onclick={Test.print}/>
</body></xml>
+fun xact () =
+ Test.transactional;
+ return <xml><body>
+ All good.
+ </body></xml>
+
+fun xact2 () =
+ Test.transactional;
+ error <xml>Failure</xml>;
+ return <xml><body>
+ All gooder.
+ </body></xml>
+
fun main () = return <xml><body>
{[Test.out (Test.frob (Test.create "Hello ") "world!")]}
<form><submit action={effect}/></form>
+ <form><submit action={xact}/></form>
+ <form><submit action={xact2}/></form>
</body></xml>