diff options
| author | Noam Postavsky | 2017-04-04 23:48:42 -0400 |
|---|---|---|
| committer | Noam Postavsky | 2017-04-22 23:17:59 -0400 |
| commit | b20d05c6d76ddaf7e70da1430c9aac56ef1d6b31 (patch) | |
| tree | 2486e20a7924dd55560c1f2749f011d802a2e3ed | |
| parent | 5317193fe55d130a456fe0cf06c56f027d617b09 (diff) | |
| download | emacs-b20d05c6d76ddaf7e70da1430c9aac56ef1d6b31.tar.gz emacs-b20d05c6d76ddaf7e70da1430c9aac56ef1d6b31.zip | |
Don't require bytecomp for running ert tests
"Fix ert-tests when running compiled" 2016-12-06 accidentally
introduced a dependency on `bytecomp' into `ert'. As mentioned in
"Avoid ert test failures" 2017-04-18, the accidental dependency of ert
on bytecomp was masked by loading other libraries until recently.
* lisp/emacs-lisp/ert.el (ert--expand-should-1): Only use
`byte-compile-macro-environment' if it's bound.
* test/src/eval-tests.el: Add defvar for dynamic variable
`byte-compile-debug'.
| -rw-r--r-- | lisp/emacs-lisp/ert.el | 4 | ||||
| -rw-r--r-- | test/src/eval-tests.el | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/lisp/emacs-lisp/ert.el b/lisp/emacs-lisp/ert.el index f4c61e625d8..280b76acfe4 100644 --- a/lisp/emacs-lisp/ert.el +++ b/lisp/emacs-lisp/ert.el | |||
| @@ -275,9 +275,9 @@ DATA is displayed to the user and should state the reason for skipping." | |||
| 275 | 275 | ||
| 276 | (defun ert--expand-should-1 (whole form inner-expander) | 276 | (defun ert--expand-should-1 (whole form inner-expander) |
| 277 | "Helper function for the `should' macro and its variants." | 277 | "Helper function for the `should' macro and its variants." |
| 278 | (require 'bytecomp) ; FIXME? | ||
| 279 | (let ((form | 278 | (let ((form |
| 280 | (macroexpand form (append byte-compile-macro-environment | 279 | (macroexpand form (append (bound-and-true-p |
| 280 | byte-compile-macro-environment) | ||
| 281 | (cond | 281 | (cond |
| 282 | ((boundp 'macroexpand-all-environment) | 282 | ((boundp 'macroexpand-all-environment) |
| 283 | macroexpand-all-environment) | 283 | macroexpand-all-environment) |
diff --git a/test/src/eval-tests.el b/test/src/eval-tests.el index 95655eac826..03f408716b1 100644 --- a/test/src/eval-tests.el +++ b/test/src/eval-tests.el | |||
| @@ -32,6 +32,8 @@ | |||
| 32 | ;; This should not crash. | 32 | ;; This should not crash. |
| 33 | (should-error (funcall '(closure)) :type 'invalid-function)) | 33 | (should-error (funcall '(closure)) :type 'invalid-function)) |
| 34 | 34 | ||
| 35 | (defvar byte-compile-debug) | ||
| 36 | |||
| 35 | (ert-deftest eval-tests--bugs-24912-and-24913 () | 37 | (ert-deftest eval-tests--bugs-24912-and-24913 () |
| 36 | "Checks that Emacs doesn’t accept weird argument lists. | 38 | "Checks that Emacs doesn’t accept weird argument lists. |
| 37 | Bug#24912 and Bug#24913." | 39 | Bug#24912 and Bug#24913." |