diff options
author | Jim Meyering <jim@meyering.net> | 2003-04-08 10:55:01 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2003-04-08 10:55:01 +0000 |
commit | c54ba76168aa7519087d32f9c8f0b739a6420b4b (patch) | |
tree | efce3525f29e52ef825446799aa9881b1910c14f /tests/rm | |
parent | 5d425f8eedcfe909a773e2ecfc72b721276ff38b (diff) | |
download | coreutils-c54ba76168aa7519087d32f9c8f0b739a6420b4b.tar.xz |
Run $PERL to see if it is available, rather than testing its value.
Diffstat (limited to 'tests/rm')
-rwxr-xr-x | tests/rm/empty-name | 9 | ||||
-rwxr-xr-x | tests/rm/fail-eperm | 10 | ||||
-rwxr-xr-x | tests/rm/unreadable | 9 |
3 files changed, 12 insertions, 16 deletions
diff --git a/tests/rm/empty-name b/tests/rm/empty-name index e20a146af..c9db70a99 100755 --- a/tests/rm/empty-name +++ b/tests/rm/empty-name @@ -7,12 +7,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/rm/fail-eperm b/tests/rm/fail-eperm index 837804bdd..2e4d64cb3 100755 --- a/tests/rm/fail-eperm +++ b/tests/rm/fail-eperm @@ -6,13 +6,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 +} ARGV_0=$0 export ARGV_0 diff --git a/tests/rm/unreadable b/tests/rm/unreadable index a778e015d..737e22a99 100755 --- a/tests/rm/unreadable +++ b/tests/rm/unreadable @@ -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; |