diff options
| author | Lars Ingebrigtsen | 2019-10-12 21:34:56 +0200 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2019-10-12 21:34:56 +0200 |
| commit | 3fcfa8071ac820c2a857b890de31ba5517d7249e (patch) | |
| tree | 931c6b302912dde174298661e345e78c6e62b21f | |
| parent | cb24f4a145d52fcef858972be6a5c71b7f06eb11 (diff) | |
| download | emacs-3fcfa8071ac820c2a857b890de31ba5517d7249e.tar.gz emacs-3fcfa8071ac820c2a857b890de31ba5517d7249e.zip | |
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).
| -rw-r--r-- | lisp/emacs-lisp/ert.el | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lisp/emacs-lisp/ert.el b/lisp/emacs-lisp/ert.el index da241e6304f..68762b0752c 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 | |||
| 192 | using :expected-result. See `ert-test-result-type-p' for a | 192 | using :expected-result. See `ert-test-result-type-p' for a |
| 193 | description of valid values for RESULT-TYPE. | 193 | description of valid values for RESULT-TYPE. |
| 194 | 194 | ||
| 195 | Macros in BODY are expanded when the test is defined, not when it | ||
| 196 | is run. If a macro (possibly with side effects) is to be tested, | ||
| 197 | it has to be wrapped in `(eval (quote ...))'. | ||
| 198 | |||
| 195 | \(fn NAME () [DOCSTRING] [:expected-result RESULT-TYPE] \ | 199 | \(fn NAME () [DOCSTRING] [:expected-result RESULT-TYPE] \ |
| 196 | [:tags \\='(TAG...)] BODY...)" | 200 | [:tags \\='(TAG...)] BODY...)" |
| 197 | (declare (debug (&define :name test | 201 | (declare (debug (&define :name test |