diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2022-05-21 06:25:43 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2022-05-21 06:25:43 -0700 |
commit | 7a2c2e84dd0d520fb08402895b4f7cd8c139a81b (patch) | |
tree | ea9d8988ca1ea7023407a97ecd2b3c90298c0e1d /tests/011 | |
parent | 8465d27df3fef6089ea122914a0c6b0cf7b82e85 (diff) | |
download | txr-7a2c2e84dd0d520fb08402895b4f7cd8c139a81b.tar.gz txr-7a2c2e84dd0d520fb08402895b4f7cd8c139a81b.tar.bz2 txr-7a2c2e84dd0d520fb08402895b4f7cd8c139a81b.zip |
tests: add forgotten test for new expansion rule.
This was developed together with what became the May 12 commit
1162a735b61c1c5086fb6055471ee35cc8ed62a4; I just forgot to
git add the file.
* tests/011/macros-4.tl
Diffstat (limited to 'tests/011')
-rw-r--r-- | tests/011/macros-4.tl | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/011/macros-4.tl b/tests/011/macros-4.tl new file mode 100644 index 00000000..440dcd9e --- /dev/null +++ b/tests/011/macros-4.tl @@ -0,0 +1,11 @@ +(load "../common") + +(defmacro xsqrt (:match :form f) + (((* @exp @exp)) exp) + (@else f)) + +(defmacro xexpt (:match :form f) + ((@exp 2) ^(* ,exp ,exp)) + (@else f)) + +(test (expand '(xsqrt (xexpt x 2))) x) |