diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2011-10-01 19:46:34 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2011-10-01 19:46:34 -0700 |
commit | 2e7542a6b590e4662cff1ab1eab62945b7bbccad (patch) | |
tree | 2902d4d9b9245a5cdff250aed6822a86f7b882d6 /tests | |
parent | 949fcea2c7832d799f08f09b5afba0e483fa66a8 (diff) | |
download | txr-2e7542a6b590e4662cff1ab1eab62945b7bbccad.tar.gz txr-2e7542a6b590e4662cff1ab1eab62945b7bbccad.tar.bz2 txr-2e7542a6b590e4662cff1ab1eab62945b7bbccad.zip |
New test case, covering exception handling across nested
function invocations.
* Makefile (TEST): Test targets marked as .PHONY, because they are.
* tests/007/except-1.expected: New file.
* tests/007/except-1.out: New file.
* tests/007/except-1.txr: New file.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/007/except-1.expected | 2 | ||||
-rw-r--r-- | tests/007/except-1.out | 2 | ||||
-rw-r--r-- | tests/007/except-1.txr | 32 |
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) |