[PATCH] tests: use skip_ consistently.

Karl Berry <[email protected]>
Newsgroups gmane.comp.sysutils.automake.patches
Message-ID <[email protected]>
I belatedly noticed that I should have used skip_ instead of exit 77
in my new too-old-Emacs test. Plus found a wrong occurrence of just
"skip" without the _ in uninstall-fail.sh. Look ok?

(uninstall-fail has more failures in the case of a newer File::Path, due
to changes in rmtree as used in deltree.pl, but that'll be another day.)
--thanks, karl.
am-skip.diff (application/octet-stream, 1.6 KB)
From 11199eb8b6db96f57fe75979d4a6f3bf547d7ce9 Mon Sep 17 00:00:00 2001
From: Karl Berry <[email protected]>
Date: Tue, 7 Jan 2020 18:15:07 -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 37bec19..e68a31d 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 4041e44..59f8aa7 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.,
-- 
1.8.3.1
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.