diff options
author | Lars Ingebrigtsen <larsi@gnus.org> | 2019-06-09 20:33:57 +0200 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2019-06-09 20:33:57 +0200 |
commit | 30a8cfa24b9450099f7ba365b7c16a1ddf75ed35 (patch) | |
tree | 9f9723e0df99c0fa30296eb621aa04716d2b8d6c | |
parent | a3f4c42db8236dfa56bd5a362bd58cd2e7c891be (diff) | |
download | emacs-30a8cfa24b9450099f7ba365b7c16a1ddf75ed35.tar.gz |
Start implementing tests
-rw-r--r-- | test/lisp/emacs-lisp/bytecomp-tests.el | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/test/lisp/emacs-lisp/bytecomp-tests.el b/test/lisp/emacs-lisp/bytecomp-tests.el index f45c9209c14..6672bc4ef5b 100644 --- a/test/lisp/emacs-lisp/bytecomp-tests.el +++ b/test/lisp/emacs-lisp/bytecomp-tests.el @@ -680,6 +680,30 @@ literals (Bug#20852)." (should-not (member '(byte-constant 333) lap)) (should (member '(byte-constant 444) lap))))) +(ert-deftest bytecomp-test--with-suppressed-warnings () + (let ((lexical-binding t) + (byte-compile-log-buffer (generate-new-buffer " *Compile-Log*"))) + (let ((form '(defvar prefixless))) + (with-current-buffer byte-compile-log-buffer + (let ((inhibit-read-only t)) + (erase-buffer))) + (test-byte-comp-compile-and-load t + form) + (with-current-buffer byte-compile-log-buffer + (goto-char (point-min)) + (should (re-search-forward "global/dynamic var .prefixless. lacks" + nil t))) + (with-current-buffer byte-compile-log-buffer + (let ((inhibit-read-only t)) + (erase-buffer))) + (test-byte-comp-compile-and-load t + `(with-suppressed-warnings ((lexical prefixless)) + ,form)) + (with-current-buffer byte-compile-log-buffer + (goto-char (point-min)) + (should-not (re-search-forward "global/dynamic var .prefixless. lacks" + nil t)))))) + ;; Local Variables: ;; no-byte-compile: t ;; End: |