From 01db7b0de54acf80cf4b4a55d3e9a9dab454b0aa Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Wed, 8 Jan 2020 18:21:26 -0800 Subject: [PATCH] tests: use skip_ consistently. * t/lisp-loadpath.sh: use skip_ instead of exit 77; also, notice and reset if the EMACS envvar is simply "t". * t/uninstall-fail.sh: use skip_ instead of the undefined skip. --- t/lisp-loadpath.sh | 6 +++++- t/uninstall-fail.sh | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/t/lisp-loadpath.sh b/t/lisp-loadpath.sh index 37bec19d6..0e972d552 100644 --- a/t/lisp-loadpath.sh +++ b/t/lisp-loadpath.sh @@ -32,9 +32,13 @@ required=emacs # Situation with Emacs 22 and 23 is unknown, so play it safe and skip # the test for them too. # +# Meanwhile, Emacs sets the EMACS envvar to t in subshells. +# If that's what we've got, use "emacs" instead. +test "$EMACS" = t && EMACS=emacs || : + emacs_major=$(${EMACS-emacs} --version | sed -e 's/.* //;s/\..*$//;1q') if test -z "$emacs_major" || test "$emacs_major" -le 23; then - exit 77 + skip_ "emacs version $emacs_major may reverse -L ordering" fi cat >> configure.ac << 'END' diff --git a/t/uninstall-fail.sh b/t/uninstall-fail.sh index 4041e441b..59f8aa7d1 100644 --- a/t/uninstall-fail.sh +++ b/t/uninstall-fail.sh @@ -24,7 +24,7 @@ mkdir d : > d/f -chmod a-w d || skip "cannot make directories unwritable" +chmod a-w d || skip_ "cannot make directories unwritable" # On Solaris 10, if '/bin/rm' is run with the '-f' option, it doesn't # print any error message when failing to remove a file (due to e.g., -- 2.47.2