diff options
-rw-r--r-- | ChangeLog | 11 | ||||
-rw-r--r-- | Makefile | 2 | ||||
-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 |
5 files changed, 48 insertions, 1 deletions
@@ -1,5 +1,16 @@ 2011-10-01 Kaz Kylheku <kaz@kylheku.com> + 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. + +2011-10-01 Kaz Kylheku <kaz@kylheku.com> + * parser.y (all_clause, some_clause, none_clause, maybe_clause, cases_clause, choose_clause, elem): Regression bug fix: bad list calls in parser, lacking nao terminator. @@ -77,7 +77,7 @@ depend: TESTS := $(patsubst $(top_srcdir)/%.txr,./%.ok,\ $(shell find $(top_srcdir)/tests -name '*.txr' | sort)) -.PHONY: tests +.PHONY: tests $(TEST) tests: $(TESTS) @echo "** tests passed!" 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) |