diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2014-02-28 01:37:43 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2014-02-28 01:37:43 -0800 |
commit | 1dcc39dbd54082af1e4c1cc9a2ca5ef30f2c4536 (patch) | |
tree | 0827dc0b135161cc1f4a633d7c2142210e77c624 /tests/011/macros-1.txr | |
parent | a9e06b4e815240f7f954d237f8625c30338be55f (diff) | |
download | txr-1dcc39dbd54082af1e4c1cc9a2ca5ef30f2c4536.tar.gz txr-1dcc39dbd54082af1e4c1cc9a2ca5ef30f2c4536.tar.bz2 txr-1dcc39dbd54082af1e4c1cc9a2ca5ef30f2c4536.zip |
About time for some new regression tests.
* tests/011/macros-1.expected: New file.
* tests/011/macros-1.txr: New file.
* tests/011/macros-2.expected: New file.
* tests/011/macros-2.txr: New file.
* tests/011/special-1.expected: New file.
* tests/011/special-1.txr: New file.
Diffstat (limited to 'tests/011/macros-1.txr')
-rw-r--r-- | tests/011/macros-1.txr | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/011/macros-1.txr b/tests/011/macros-1.txr new file mode 100644 index 00000000..35b9d472 --- /dev/null +++ b/tests/011/macros-1.txr @@ -0,0 +1,24 @@ +@(do + (progn + (defmacro rem-num (:env menv some-form) + (let ((expanded (macroexpand some-form menv))) + (if (numberp (car expanded)) + (cdr expanded) + some-form))) + + (prinl + (macrolet ((foo () '(1 list 42)) + (bar () '(list 'a))) + (symacrolet ((x (bar))) + (list (rem-num (foo)) (rem-num x))))) + + (prinl + (let ((x 0)) + (symacrolet ((a (inc x))) + (list + (let* ((a a) + (b a)) + (list a b)) + (let ((a a) + (b a)) + (list a b)))))))) |