Commit 237e96bc authored by John Williams's avatar John Williams Committed by Noam Postavsky

Test that advice doesn't trigger bytecomp warnings (Bug#28803)

* test/lisp/emacs-lisp/bytecomp-tests.el
(bytecomp-tests--test-no-warnings-with-advice): New test.

Copyright-paperwork-exempt: yes
parent d719ea6a
......@@ -564,6 +564,17 @@ and will be removed soon. See (elisp)Backquote in the manual.")))))))
(byte-compile-file source t)
(should (equal bytecomp-tests--foobar (cons 1 2)))))
(ert-deftest bytecomp-tests--test-no-warnings-with-advice ()
(defun f ())
(define-advice f (:around (oldfun &rest args) test)
(apply oldfun args))
(with-current-buffer (get-buffer-create "*Compile-Log*")
(let ((inhibit-read-only t)) (erase-buffer)))
(test-byte-comp-compile-and-load t '(defun f ()))
(with-current-buffer (get-buffer-create "*Compile-Log*")
(goto-char (point-min))
(should-not (search-forward "Warning" nil t))))
;; Local Variables:
;; no-byte-compile: t
;; End:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment