diff options
| author | Philipp Stephani | 2022-06-21 19:10:14 +0200 |
|---|---|---|
| committer | Philipp Stephani | 2022-06-21 19:11:05 +0200 |
| commit | dbbf38d43f1f49a38efd260bda655e0b3cd2b6d5 (patch) | |
| tree | 9dd49312d01f9b91bbce866539281f8a83c0a827 /test | |
| parent | 16d48cf8a0153917d5047b557860668acb461e15 (diff) | |
| download | emacs-dbbf38d43f1f49a38efd260bda655e0b3cd2b6d5.tar.gz emacs-dbbf38d43f1f49a38efd260bda655e0b3cd2b6d5.zip | |
Document and test 'no-byte-compile' behavior.
* lisp/emacs-lisp/bytecomp.el (byte-compile-file): Document behavior
if 'no-byte-compile' is set.
* test/lisp/emacs-lisp/bytecomp-tests.el
(byte-compile-file/no-byte-compile): New unit test.
* test/lisp/emacs-lisp/bytecomp-resources/no-byte-compile.el: New test
file.
Diffstat (limited to 'test')
| -rw-r--r-- | test/lisp/emacs-lisp/bytecomp-resources/no-byte-compile.el | 1 | ||||
| -rw-r--r-- | test/lisp/emacs-lisp/bytecomp-tests.el | 7 |
2 files changed, 8 insertions, 0 deletions
diff --git a/test/lisp/emacs-lisp/bytecomp-resources/no-byte-compile.el b/test/lisp/emacs-lisp/bytecomp-resources/no-byte-compile.el new file mode 100644 index 00000000000..00ad1947507 --- /dev/null +++ b/test/lisp/emacs-lisp/bytecomp-resources/no-byte-compile.el | |||
| @@ -0,0 +1 @@ | |||
| ;; -*- no-byte-compile: t; -*- | |||
diff --git a/test/lisp/emacs-lisp/bytecomp-tests.el b/test/lisp/emacs-lisp/bytecomp-tests.el index fbc00b30c54..9c5bef09a34 100644 --- a/test/lisp/emacs-lisp/bytecomp-tests.el +++ b/test/lisp/emacs-lisp/bytecomp-tests.el | |||
| @@ -1642,6 +1642,13 @@ EXPECTED-POINT BINDINGS (MODES \\='\\='(ruby-mode js-mode python-mode)) \ | |||
| 1642 | (setq actual (nreverse actual)) | 1642 | (setq actual (nreverse actual)) |
| 1643 | (should (equal actual expected))))))) | 1643 | (should (equal actual expected))))))) |
| 1644 | 1644 | ||
| 1645 | (ert-deftest byte-compile-file/no-byte-compile () | ||
| 1646 | (let* ((src-file (ert-resource-file "no-byte-compile.el")) | ||
| 1647 | (dest-file (make-temp-file "bytecomp-tests-" nil ".elc")) | ||
| 1648 | (byte-compile-dest-file-function (lambda (_) dest-file))) | ||
| 1649 | (should (eq (byte-compile-file src-file) 'no-byte-compile)) | ||
| 1650 | (should-not (file-exists-p dest-file)))) | ||
| 1651 | |||
| 1645 | 1652 | ||
| 1646 | ;; Local Variables: | 1653 | ;; Local Variables: |
| 1647 | ;; no-byte-compile: t | 1654 | ;; no-byte-compile: t |