summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/007/except-1.expected2
-rw-r--r--tests/007/except-1.out2
-rw-r--r--tests/007/except-1.txr32
3 files changed, 36 insertions, 0 deletions
diff --git a/tests/007/except-1.expected b/tests/007/except-1.expected
new file mode 100644
index 00000000..93127102
--- /dev/null
+++ b/tests/007/except-1.expected
@@ -0,0 +1,2 @@
+caught u0: text0
+caught u1: text1
diff --git a/tests/007/except-1.out b/tests/007/except-1.out
new file mode 100644
index 00000000..93127102
--- /dev/null
+++ b/tests/007/except-1.out
@@ -0,0 +1,2 @@
+caught u0: text0
+caught u1: text1
diff --git a/tests/007/except-1.txr b/tests/007/except-1.txr
new file mode 100644
index 00000000..7f205a7f
--- /dev/null
+++ b/tests/007/except-1.txr
@@ -0,0 +1,32 @@
+@(defex u0)
+@(defex u1)
+@(define baz (x))
+@ (cases)
+@ (bind x "0")
+@ (throw u0 "text0")
+@ (or)
+@ (bind x "1")
+@ (throw u1 "text1")
+@ (end)
+@(end)
+@(define bar (x))
+@ (baz x)
+@(end)
+@(define foo ())
+@ (next `!echo "0\n1\n"`)
+@ (collect)
+@num
+@ (try)
+@ (bar num)
+@ (catch u0 (arg))
+@ (output)
+caught u0: @arg
+@ (end)
+@ (catch u1 (arg))
+@ (output)
+caught u1: @arg
+@ (end)
+@ (end)
+@ (end)
+@(end)
+@(foo)