]> git.eshelyaron.com Git - emacs.git/commitdiff
ert-deftest macro doc string clarification
authorLars Ingebrigtsen <larsi@gnus.org>
Sat, 12 Oct 2019 19:34:56 +0000 (21:34 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Sat, 12 Oct 2019 19:34:56 +0000 (21:34 +0200)
* lisp/emacs-lisp/ert.el (ert-deftest): Mention that macros are
expanded when defined, not when tested (bug#21742).

lisp/emacs-lisp/ert.el

index da241e6304fc46ae5b0f491ff51ec318aff6b7d5..68762b0752c4c07275d7b0e527a02d504df979ec 100644 (file)
@@ -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