Created
November 12, 2015 17:56
-
-
Save joeheyming/a3490f2b52c0108b5e15 to your computer and use it in GitHub Desktop.
How to write an ert test that makes sure your project has no byte-compile warnings.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(require 'ert) | |
(require '<<<YOUR EMACS LISP PACKAGE UNDER TEST>>>) | |
(ert-deftest no-byte-compile-warnings () | |
"Byte-compile should not emit warnings" | |
(byte-compile-file "<<<YOUR EMACS PACKAGE.el>>>") | |
(switch-to-buffer "*Compile-Log*") | |
(let ((lines (buffer-substring (point-min) (point-max)))) | |
(should (not (string-match "Warning:" lines)) ) | |
) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment