branch: elpa/zig-mode
commit 9980eabb9925098a9ab5a384d3a1a36b47e644fe
Author: joachimschmidt557 <joachim.schmidt...@outlook.com>
Commit: joachimschmidt557 <joachim.schmidt...@outlook.com>

    Install reformatter in run_tests.sh
---
 run_tests.sh | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/run_tests.sh b/run_tests.sh
index bbb57f0e24..cb504585d8 100755
--- a/run_tests.sh
+++ b/run_tests.sh
@@ -6,4 +6,17 @@ else
     echo "Running with EMACS=${EMACS}"
 fi
 
-${EMACS} --batch -l zig-mode.el -l tests.el -f ert-run-tests-batch-and-exit
+# From https://github.com/jcollard/elm-mode/blob/master/Makefile
+NEEDED_PACKAGES="reformatter"
+INIT_PACKAGES="(progn \
+  (require 'package) \
+  (push '(\"melpa\" . \"https://melpa.org/packages/\";) package-archives) \
+  (package-initialize) \
+  (dolist (pkg '(${NEEDED_PACKAGES})) \
+    (unless (package-installed-p pkg) \
+      (unless (assoc pkg package-archive-contents) \
+        (package-refresh-contents)) \
+      (package-install pkg))) \
+  )"
+
+${EMACS} --eval "${INIT_PACKAGES}" --batch -l zig-mode.el -l tests.el -f 
ert-run-tests-batch-and-exit

Reply via email to