diff options
author | Stefan Kangas <stefan@marxist.se> | 2020-12-01 04:46:33 +0100 |
---|---|---|
committer | Stefan Kangas <stefan@marxist.se> | 2020-12-01 04:49:10 +0100 |
commit | 4457b9590c83f0245604cf6a706383d9aa2c659c (patch) | |
tree | b00bb8da28c99564635e7582e3ef2cb9c4d31f43 /test/lisp/emacs-lisp/bytecomp-tests.el | |
parent | 90a543e630012cc58c175d5bf3ffd42bb156c6b6 (diff) | |
download | emacs-4457b9590c83f0245604cf6a706383d9aa2c659c.tar.gz emacs-4457b9590c83f0245604cf6a706383d9aa2c659c.tar.bz2 emacs-4457b9590c83f0245604cf6a706383d9aa2c659c.zip |
Add tests for some byte-compiler warnings
* test/lisp/emacs-lisp/bytecomp-tests.el
(bytecomp-warn/warn-interactive-only\.el)
(bytecomp-warn/warn-obsolete-defun\.el)
(bytecomp-warn/warn-obsolete-hook\.el)
(bytecomp-warn/warn-obsolete-variable-same-file\.el)
(bytecomp-warn/warn-obsolete-variable\.el): New tests.
* test/lisp/emacs-lisp/bytecomp-resources/warn-interactive-only.el:
* test/lisp/emacs-lisp/bytecomp-resources/warn-obsolete-defun.el:
* test/lisp/emacs-lisp/bytecomp-resources/warn-obsolete-hook.el:
* test/lisp/emacs-lisp/bytecomp-resources/warn-obsolete-variable-same-file.el:
* test/lisp/emacs-lisp/bytecomp-resources/warn-obsolete-variable.el:
New files.
Diffstat (limited to 'test/lisp/emacs-lisp/bytecomp-tests.el')
-rw-r--r-- | test/lisp/emacs-lisp/bytecomp-tests.el | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/lisp/emacs-lisp/bytecomp-tests.el b/test/lisp/emacs-lisp/bytecomp-tests.el index c9070c03b3f..bea9663d241 100644 --- a/test/lisp/emacs-lisp/bytecomp-tests.el +++ b/test/lisp/emacs-lisp/bytecomp-tests.el @@ -560,6 +560,24 @@ Subtests signal errors if something goes wrong." (bytecomp--define-warning-file-test "warn-free-variable-reference.el" "free.*bar") +(bytecomp--define-warning-file-test "warn-obsolete-defun.el" + "foo-obsolete.*obsolete function.*99.99") + +(defvar bytecomp--tests-obsolete-var nil) +(make-obsolete-variable 'bytecomp--tests-obsolete-var nil "99.99") + +(bytecomp--define-warning-file-test "warn-obsolete-hook.el" + "bytecomp--tests-obs.*obsolete.*99.99") + +(bytecomp--define-warning-file-test "warn-obsolete-variable-same-file.el" + "foo-obs.*obsolete.*99.99" t) + +(bytecomp--define-warning-file-test "warn-obsolete-variable.el" + "bytecomp--tests-obs.*obsolete.*99.99") + +(bytecomp--define-warning-file-test "warn-interactive-only.el" + "next-line.*interactive use only.*forward-line") + (ert-deftest test-eager-load-macro-expansion-eval-when-compile () ;; Make sure we interpret eval-when-compile forms properly. CLISP ;; and SBCL interpreter eval-when-compile (well, the CL equivalent) |