From 2e7542a6b590e4662cff1ab1eab62945b7bbccad Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Sat, 1 Oct 2011 19:46:34 -0700 Subject: 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. --- tests/007/except-1.txr | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 tests/007/except-1.txr (limited to 'tests/007/except-1.txr') 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) -- cgit v1.2.3