From 9ee6b685a338cd06d4b053e39f3e2da505d20612 Mon Sep 17 00:00:00 2001 From: Andrea Corallo Date: Mon, 4 Nov 2019 23:13:23 +0100 Subject: [PATCH] add test for macro definition --- test/src/comp-test-funcs.el | 3 +++ test/src/comp-tests.el | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/test/src/comp-test-funcs.el b/test/src/comp-test-funcs.el index 79a25511fad..e3fc0f26b58 100644 --- a/test/src/comp-test-funcs.el +++ b/test/src/comp-test-funcs.el @@ -235,6 +235,9 @@ (t (+ (comp-tests-fib-f (- n 1)) (comp-tests-fib-f (- n 2)))))) +(defmacro comp-tests-macro-m (x) + x) + ;;;;;;;;;;;;;;;;;;;; ;; Tromey's tests ;; ;;;;;;;;;;;;;;;;;;;; diff --git a/test/src/comp-tests.el b/test/src/comp-tests.el index 6eada52541f..9e0ca196871 100644 --- a/test/src/comp-tests.el +++ b/test/src/comp-tests.el @@ -274,6 +274,10 @@ (ert-deftest comp-tests-recursive () (should (= (comp-tests-fib-f 10) 55))) +(ert-deftest comp-tests-macro () + "Just check we can define macros" + (should (macrop (symbol-function 'comp-tests-macro-m)))) + ;;;;;;;;;;;;;;;;;;;; ;; Tromey's tests ;; ;;;;;;;;;;;;;;;;;;;; -- 2.39.5