branch: elpa/rust-mode
commit 7baae9c153a9b7f3872ad027aed48aa9a734498d
Merge: c9c7871 ee171df
Author: Huon Wilson <[email protected]>
Commit: Huon Wilson <[email protected]>
Merge pull request #78 from tromey/fix-issue-33
test $EMACS directly rather than using "which"
---
run_rust_emacs_tests.sh | 12 +++++++-----
1 file 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