branch: elpa/macrostep
commit aa40d97caf00ed7e245f025b1c584c49259fc796
Author: joddie <[email protected]>
Commit: joddie <[email protected]>
Test expansion within Elisp macro-defining macros
---
macrostep-test.el | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/macrostep-test.el b/macrostep-test.el
index 5fc6cbf..8c298f7 100644
--- a/macrostep-test.el
+++ b/macrostep-test.el
@@ -217,6 +217,21 @@
(eq (get-char-property (point) 'font-lock-face)
'macrostep-macro-face))))))
+(ert-deftest macrostep-expand-macro-defined-macros ()
+ (defmacro with-local-dummy-macro (&rest body)
+ `(cl-macrolet ((dummy (&rest args) `(expansion (of) ,@args)))
+ ,@body))
+ (macrostep-with-text
+ '(with-local-dummy-macro
+ (dummy form (one))
+ (dummy (form two)))
+ (macrostep-should-expand
+ '(dummy form (one))
+ '(expansion (of) form (one)))
+ (macrostep-should-expand
+ '(dummy (form two))
+ '(expansion (of) (form two)))))
+
(ert-deftest macrostep-expand-in-separate-buffer ()
(defmacro macrostep-dummy-macro (&rest args)
`(expansion of ,@args))