diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2015-10-17 09:33:16 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2015-10-17 09:33:16 -0700 |
commit | a6d77c200e36995d38bec27bed0976e1beda1b79 (patch) | |
tree | 3b2e98e6cb2803236d232c09f9b9a312bd25472c /tests/012 | |
parent | 1577b280d2f5101db1f0299efc41ab4bd2c1fa5a (diff) | |
download | txr-a6d77c200e36995d38bec27bed0976e1beda1b79.tar.gz txr-a6d77c200e36995d38bec27bed0976e1beda1b79.tar.bz2 txr-a6d77c200e36995d38bec27bed0976e1beda1b79.zip |
New test case for handle and frame introspection.
* tests/012/except.tl: New file.
* tests/012/except.expected: New file.
Diffstat (limited to 'tests/012')
-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)) |