summaryrefslogtreecommitdiff
path: root/tests/sum
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2003-04-08 10:55:01 +0000
committerJim Meyering <jim@meyering.net>2003-04-08 10:55:01 +0000
commitc54ba76168aa7519087d32f9c8f0b739a6420b4b (patch)
treeefce3525f29e52ef825446799aa9881b1910c14f /tests/sum
parent5d425f8eedcfe909a773e2ecfc72b721276ff38b (diff)
downloadcoreutils-c54ba76168aa7519087d32f9c8f0b739a6420b4b.tar.xz
Run $PERL to see if it is available, rather than testing its value.
Diffstat (limited to 'tests/sum')
-rwxr-xr-xtests/sum/basic-19
-rwxr-xr-xtests/sum/sysv9
2 files changed, 8 insertions, 10 deletions
diff --git a/tests/sum/basic-1 b/tests/sum/basic-1
index 5c12dfb51..0b752adb9 100755
--- a/tests/sum/basic-1
+++ b/tests/sum/basic-1
@@ -3,12 +3,11 @@
: ${PERL=perl}
: ${srcdir=.}
-case "$PERL" in
- *'missing perl')
- echo 1>&2 "$0: configure didn't find a usable version of Perl, so can't run this test"
+$PERL -e 1 > /dev/null 2>&1 || {
+ echo 1>&2 "$0: configure didn't find a usable version of Perl," \
+ "so can't run this test"
exit 77
- ;;
-esac
+}
exec $PERL -w -I$srcdir/.. -MFetish -- - <<\EOF
require 5.003;
diff --git a/tests/sum/sysv b/tests/sum/sysv
index 39697bb73..cda557018 100755
--- a/tests/sum/sysv
+++ b/tests/sum/sysv
@@ -6,12 +6,11 @@ if test "$VERBOSE" = yes; then
sum --version
fi
-case "$PERL" in
- *'missing perl')
- echo 1>&2 "$0: configure didn't find a usable version of Perl, so can't run this test"
+$PERL -e 1 > /dev/null 2>&1 || {
+ echo 1>&2 "$0: configure didn't find a usable version of Perl," \
+ "so can't run this test"
exit 77
- ;;
-esac
+}
# Avoid a problem when run in a UTF-8 locale.
# Otherwise, Perl would try to (and fail to) interpret