From a6d77c200e36995d38bec27bed0976e1beda1b79 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Sat, 17 Oct 2015 09:33:16 -0700 Subject: New test case for handle and frame introspection. * tests/012/except.tl: New file. * tests/012/except.expected: New file. --- tests/012/except.expected | 2 ++ tests/012/except.tl | 17 +++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 tests/012/except.expected create mode 100644 tests/012/except.tl diff --git a/tests/012/except.expected b/tests/012/except.expected new file mode 100644 index 00000000..1191247b --- /dev/null +++ b/tests/012/except.expected @@ -0,0 +1,2 @@ +1 +2 diff --git a/tests/012/except.tl b/tests/012/except.tl new file mode 100644 index 00000000..1eb85017 --- /dev/null +++ b/tests/012/except.tl @@ -0,0 +1,17 @@ +(load "../common") + +(defex d c b a) + +(defmacro cont (. forms) + ^(catch (progn ,*forms) (cont (arg) arg))) + +(test + (handle (list (cont (throw 'd 1)) + (cont (throw 'c 2))) + (a (exc arg) + (let ((cont (find-frame 'cont))) + (if cont + (progn + (prinl arg) + (invoke-catch cont 'cont (+ 100 arg))))))) + (101 102)) -- cgit v1.2.3