Skip to content

Commit 9e83b30

Browse files
committed
Merge pull request #21 from pnkfelix/tests-allow-override-of-which-emacs
Allow user to override which emacs is used in run_rust_emacs_tests.sh
2 parents 66438d4 + 3878cc6 commit 9e83b30

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

run_rust_emacs_tests.sh

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,13 @@
1010
# except according to those terms.
1111
#
1212
# This runs the test for emacs rust-mode.
13-
# It must be possible to find emacs via PATH.
14-
emacs -batch -l rust-mode.el -l rust-mode-tests.el -f ert-run-tests-batch-and-exit
13+
# Either $EMACS must be set, or it must be possible to find emacs via PATH.
14+
15+
if [ -z "$EMACS" ]; then
16+
EMACS=emacs
17+
elif [ ! $(which "$EMACS") ]; then
18+
echo "You must set EMACS to a program that runs emacs."
19+
exit 1
20+
fi
21+
22+
"$EMACS" -batch -l rust-mode.el -l rust-mode-tests.el -f ert-run-tests-batch-and-exit

0 commit comments

Comments
 (0)