summaryrefslogtreecommitdiff
path: root/tests/md5sum
diff options
context:
space:
mode:
Diffstat (limited to 'tests/md5sum')
-rwxr-xr-xtests/md5sum/basic-19
-rwxr-xr-xtests/md5sum/newline-16
2 files changed, 6 insertions, 9 deletions
diff --git a/tests/md5sum/basic-1 b/tests/md5sum/basic-1
index d2dfb4228..e76c304a3 100755
--- a/tests/md5sum/basic-1
+++ b/tests/md5sum/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/md5sum/newline-1 b/tests/md5sum/newline-1
index a075f3f50..7473e554d 100755
--- a/tests/md5sum/newline-1
+++ b/tests/md5sum/newline-1
@@ -3,13 +3,11 @@
: ${PERL=perl}
: ${srcdir=.}
-case "$PERL" in
- *'missing perl')
+$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
+}
# See if we can create a filename that contains a newline.
# Be careful to do it in a subshell so that we can redirect the