diff options
Diffstat (limited to 'tests/007/except-1.txr')
-rw-r--r-- | tests/007/except-1.txr | 32 |
1 files changed, 32 insertions, 0 deletions
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) |