From c54ba76168aa7519087d32f9c8f0b739a6420b4b Mon Sep 17 00:00:00 2001 From: Jim Meyering <jim@meyering.net> Date: Tue, 8 Apr 2003 10:55:01 +0000 Subject: Run $PERL to see if it is available, rather than testing its value. --- tests/sha1sum/basic-1 | 9 ++++----- tests/sha1sum/sample-vec | 9 ++++----- 2 files changed, 8 insertions(+), 10 deletions(-) (limited to 'tests/sha1sum') diff --git a/tests/sha1sum/basic-1 b/tests/sha1sum/basic-1 index 8e148267a..8910185b9 100755 --- a/tests/sha1sum/basic-1 +++ b/tests/sha1sum/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/sha1sum/sample-vec b/tests/sha1sum/sample-vec index e300778e7..b6d86589d 100755 --- a/tests/sha1sum/sample-vec +++ b/tests/sha1sum/sample-vec @@ -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; -- cgit v1.2.3-70-g09d2