summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorArtur Malabarba <bruce.connor.am@gmail.com>2015-09-23 14:14:52 +0100
committerArtur Malabarba <bruce.connor.am@gmail.com>2015-09-24 15:33:54 +0100
commit516adfe8dd9ac4bd33713f2db6f8ef173e4c7519 (patch)
tree629f46fd2f936729bebe182a3e176fd75ce4e077 /test
parent5473d2c2a3cb1de4705119c5f5ebcea04134461a (diff)
Add a test for byte-compiler warnings
Diffstat (limited to 'test')
-rw-r--r--test/cider-bytecomp-warnings.el16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/cider-bytecomp-warnings.el b/test/cider-bytecomp-warnings.el
new file mode 100644
index 00000000..0975df53
--- /dev/null
+++ b/test/cider-bytecomp-warnings.el
@@ -0,0 +1,16 @@
+;; This is a script to be loaded while visiting a CIDER source file. It will
+;; prepare all requirements and then byte-compile the file and signal an error
+;; on any warning. For example:
+;; emacs -Q --batch -l test/cider-bytecomp-warnings.el cider-mode.el
+
+;; This assumes that all CIDER dependencies are already on the package dir
+;; (probably from running `cask install').
+
+(setq load-prefer-newer t)
+(add-to-list 'load-path (expand-file-name "./"))
+(require 'package)
+(package-generate-autoloads 'cider default-directory)
+(package-initialize)
+(load-file "cider-autoloads.el")
+(setq byte-compile-error-on-warn t)
+(batch-byte-compile)