From 7a2c2e84dd0d520fb08402895b4f7cd8c139a81b Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Sat, 21 May 2022 06:25:43 -0700 Subject: 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 --- tests/011/macros-4.tl | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 tests/011/macros-4.tl 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) -- cgit v1.2.3