summaryrefslogtreecommitdiff
path: root/run_rust_emacs_tests.sh
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2015-06-20 18:48:37 -0600
committerTom Tromey <tom@tromey.com>2015-06-20 18:50:37 -0600
commitee171df9bacca952d2cda891fad7590ace4b763e (patch)
tree724622b16246e70848c687180878c051085718d3 /run_rust_emacs_tests.sh
parent5ed467549abe81415241b0ea45e2ae87584b588c (diff)
downloadrust-mode-ee171df9bacca952d2cda891fad7590ace4b763e.tar.gz
test $EMACS directly rather than using "which"
Fixes #33
Diffstat (limited to 'run_rust_emacs_tests.sh')
-rwxr-xr-xrun_rust_emacs_tests.sh12
1 files changed, 7 insertions, 5 deletions
diff --git a/run_rust_emacs_tests.sh b/run_rust_emacs_tests.sh
index c9c2e40..c065c9e 100755
--- a/run_rust_emacs_tests.sh
+++ b/run_rust_emacs_tests.sh
@@ -14,19 +14,21 @@
if [ -z "$EMACS" ]; then
EMACS=emacs
-elif [ ! $(which "$EMACS") ]; then
+fi
+
+$EMACS --batch || {
echo "You must set EMACS to a program that runs emacs."
exit 1
-fi
+}
-$( "$EMACS" -batch > /dev/null 2>&1 ) || {
+$( $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 ) || {
+$( $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
+$EMACS -batch -l rust-mode.el -l rust-mode-tests.el -f ert-run-tests-batch-and-exit