summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adam@chlipala.net>2010-09-07 08:28:07 -0400
committerGravatar Adam Chlipala <adam@chlipala.net>2010-09-07 08:28:07 -0400
commit2abed5bc95fa69a49d955e0b115d0db874f53a3a (patch)
treeab4a39c6f88b3e8719c9e41dfcd7f147126ef790 /tests
parent9b122d78f58a8c22d0f4c4bde2d935c4508e00b8 (diff)
Server-side 'onError'
Diffstat (limited to 'tests')
-rw-r--r--tests/onerror.ur4
-rw-r--r--tests/onerror.urp4
-rw-r--r--tests/onerror.urs1
-rw-r--r--tests/onerrorE.ur5
4 files changed, 14 insertions, 0 deletions
diff --git a/tests/onerror.ur b/tests/onerror.ur
new file mode 100644
index 00000000..9877d8d7
--- /dev/null
+++ b/tests/onerror.ur
@@ -0,0 +1,4 @@
+fun main n =
+ case n of
+ 0 => error <xml>Zero is bad!</xml>
+ | _ => return <xml/>
diff --git a/tests/onerror.urp b/tests/onerror.urp
new file mode 100644
index 00000000..39d7ac7d
--- /dev/null
+++ b/tests/onerror.urp
@@ -0,0 +1,4 @@
+onError OnerrorE.err
+
+onerrorE
+onerror
diff --git a/tests/onerror.urs b/tests/onerror.urs
new file mode 100644
index 00000000..38b757ea
--- /dev/null
+++ b/tests/onerror.urs
@@ -0,0 +1 @@
+val main : int -> transaction page
diff --git a/tests/onerrorE.ur b/tests/onerrorE.ur
new file mode 100644
index 00000000..b2948c71
--- /dev/null
+++ b/tests/onerrorE.ur
@@ -0,0 +1,5 @@
+fun err x = return <xml><body>
+ <h1>Bad thing!</h1>
+
+ {x}
+</body></xml>