summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiko Matsakis <niko@alum.mit.edu>2015-02-08 07:01:59 -0500
committerNiko Matsakis <niko@alum.mit.edu>2015-02-08 07:01:59 -0500
commit8d99bf84b5cde2b61b0080be1cc82e858f9b014a (patch)
tree9113fba83506ba8c59ff1b93c5722e4dbba83621
parent4d633fc20de2560f26bcaca95b5458dfa2efb6eb (diff)
parentb3f87b903ab54190e1a4d1efe9b9dd87fab4ab3c (diff)
downloadrust-mode-8d99bf84b5cde2b61b0080be1cc82e858f9b014a.tar.gz
Merge pull request #31 from pnkfelix/more-robust-test-driver
Make the test driver script a little more informative.
-rwxr-xr-xrun_rust_emacs_tests.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/run_rust_emacs_tests.sh b/run_rust_emacs_tests.sh
index dc4458f..c9c2e40 100755
--- a/run_rust_emacs_tests.sh
+++ b/run_rust_emacs_tests.sh
@@ -19,4 +19,14 @@ elif [ ! $(which "$EMACS") ]; then
exit 1
fi
+$( "$EMACS" -batch > /dev/null 2>&1 ) || {
+ echo "Your emacs command ($EMACS) does not run properly."
+ exit 2
+};
+
+$( "$EMACS" -batch --eval "(require 'ert)" > /dev/null 2>&1 ) || {
+ echo 'You must install the `ert` dependency; see README.md'
+ exit 3
+};
+
"$EMACS" -batch -l rust-mode.el -l rust-mode-tests.el -f ert-run-tests-batch-and-exit