diff options
-rw-r--r-- | tests/012/except.expected | 2 | ||||
-rw-r--r-- | tests/012/except.tl | 17 |
2 files changed, 19 insertions, 0 deletions
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)) |