emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 3fcfa80: ert-deftest macro doc string clarification


From: Lars Ingebrigtsen
Subject: [Emacs-diffs] master 3fcfa80: ert-deftest macro doc string clarification
Date: Sat, 12 Oct 2019 15:35:09 -0400 (EDT)

branch: master
commit 3fcfa8071ac820c2a857b890de31ba5517d7249e
Author: Lars Ingebrigtsen <address@hidden>
Commit: Lars Ingebrigtsen <address@hidden>

    ert-deftest macro doc string clarification
    
    * lisp/emacs-lisp/ert.el (ert-deftest): Mention that macros are
    expanded when defined, not when tested (bug#21742).
---
 lisp/emacs-lisp/ert.el | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lisp/emacs-lisp/ert.el b/lisp/emacs-lisp/ert.el
index da241e6..68762b0 100644
--- a/lisp/emacs-lisp/ert.el
+++ b/lisp/emacs-lisp/ert.el
@@ -192,6 +192,10 @@ Tests that are expected to fail can be marked as such
 using :expected-result.  See `ert-test-result-type-p' for a
 description of valid values for RESULT-TYPE.
 
+Macros in BODY are expanded when the test is defined, not when it
+is run.  If a macro (possibly with side effects) is to be tested,
+it has to be wrapped in `(eval (quote ...))'.
+
 \(fn NAME () [DOCSTRING] [:expected-result RESULT-TYPE] \
 [:tags \\='(TAG...)] BODY...)"
   (declare (debug (&define :name test



reply via email to

[Prev in Thread] Current Thread [Next in Thread]