summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/tryDml.ur13
-rw-r--r--tests/tryDml.urp4
-rw-r--r--tests/tryDml.urs1
3 files changed, 18 insertions, 0 deletions
diff --git a/tests/tryDml.ur b/tests/tryDml.ur
new file mode 100644
index 00000000..bfe98cdb
--- /dev/null
+++ b/tests/tryDml.ur
@@ -0,0 +1,13 @@
+table t : {Id : int}
+ PRIMARY KEY Id
+
+fun doStuff () =
+ dml (INSERT INTO t (Id) VALUES (0));
+ o1 <- tryDml (INSERT INTO t (Id) VALUES (0));
+ dml (INSERT INTO t (Id) VALUES (1));
+ o2 <- tryDml (INSERT INTO t (Id) VALUES (1));
+ return <xml>{[o1]}; {[o2]}</xml>
+
+fun main () = return <xml><body>
+ <form> <submit action={doStuff}/> </form>
+</body></xml>
diff --git a/tests/tryDml.urp b/tests/tryDml.urp
new file mode 100644
index 00000000..cf42105b
--- /dev/null
+++ b/tests/tryDml.urp
@@ -0,0 +1,4 @@
+database dbname=trydml
+sql trydml.sql
+
+tryDml
diff --git a/tests/tryDml.urs b/tests/tryDml.urs
new file mode 100644
index 00000000..6ac44e0b
--- /dev/null
+++ b/tests/tryDml.urs
@@ -0,0 +1 @@
+val main : unit -> transaction page