summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtests/basename/basic12
-rwxr-xr-xtests/dd/skip-seek9
-rwxr-xr-xtests/dircolors/simple9
-rwxr-xr-xtests/expr/basic12
-rwxr-xr-xtests/factor/basic12
-rwxr-xr-xtests/fmt/basic9
-rwxr-xr-xtests/ls-2/tests9
-rwxr-xr-xtests/md5sum/basic-19
-rwxr-xr-xtests/md5sum/newline-16
-rwxr-xr-xtests/misc/sort9
-rwxr-xr-xtests/misc/tty-eof10
-rwxr-xr-xtests/mv/i-19
-rwxr-xr-xtests/rm/empty-name9
-rwxr-xr-xtests/rm/fail-eperm10
-rwxr-xr-xtests/rm/unreadable9
-rwxr-xr-xtests/seq/basic12
-rwxr-xr-xtests/sha1sum/basic-19
-rwxr-xr-xtests/sha1sum/sample-vec9
-rwxr-xr-xtests/sum/basic-19
-rwxr-xr-xtests/sum/sysv9
-rwxr-xr-xtests/tsort/basic-110
-rwxr-xr-xtests/unexpand/basic-19
22 files changed, 90 insertions, 120 deletions
diff --git a/tests/basename/basic b/tests/basename/basic
index f44e39823..e98e842b9 100755
--- a/tests/basename/basic
+++ b/tests/basename/basic
@@ -4,13 +4,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"
- exit 77
- ;;
-esac
+$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
+}
d=$srcdir/..
exec $PERL -w -I$d -MFetish -- - << \EOF
diff --git a/tests/dd/skip-seek b/tests/dd/skip-seek
index 97345a9cc..ecec6b915 100755
--- a/tests/dd/skip-seek
+++ b/tests/dd/skip-seek
@@ -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
+}
SCRIPT_NAME=$0
export SCRIPT_NAME
diff --git a/tests/dircolors/simple b/tests/dircolors/simple
index 2f3a4ca2b..99d772e1c 100755
--- a/tests/dircolors/simple
+++ b/tests/dircolors/simple
@@ -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/expr/basic b/tests/expr/basic
index e1c213833..da978e7d5 100755
--- a/tests/expr/basic
+++ b/tests/expr/basic
@@ -4,13 +4,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"
- exit 77
- ;;
-esac
+$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
+}
d=$srcdir/..
exec $PERL -w -I$d -MFetish -- - << \EOF
diff --git a/tests/factor/basic b/tests/factor/basic
index 0c830315f..884dd1280 100755
--- a/tests/factor/basic
+++ b/tests/factor/basic
@@ -4,13 +4,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"
- exit 77
- ;;
-esac
+$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
+}
d=$srcdir/..
exec $PERL -w -I$d -MFetish -- - << \EOF
diff --git a/tests/fmt/basic b/tests/fmt/basic
index 7450a94ef..fb1c060b9 100755
--- a/tests/fmt/basic
+++ b/tests/fmt/basic
@@ -4,12 +4,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
+}
# Export this to avoid hassles when run in a UTF-8 locale,
# since we use 8-bit characters below, and those values are
diff --git a/tests/ls-2/tests b/tests/ls-2/tests
index 55a6fd56d..7b1a14ab2 100755
--- a/tests/ls-2/tests
+++ b/tests/ls-2/tests
@@ -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/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
diff --git a/tests/misc/sort b/tests/misc/sort
index 06cf6ace7..cd3ff5395 100755
--- a/tests/misc/sort
+++ b/tests/misc/sort
@@ -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/misc/tty-eof b/tests/misc/tty-eof
index c5d57ab01..784bd204d 100755
--- a/tests/misc/tty-eof
+++ b/tests/misc/tty-eof
@@ -2,13 +2,11 @@
: ${PERL=perl}
-case "$PERL" in
- *'missing perl')
- echo 1>&2 "$0: configure didn't find a usable version of Perl, so can't run thi
-s 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/mv/i-1 b/tests/mv/i-1
index 98929b423..517942a25 100755
--- a/tests/mv/i-1
+++ b/tests/mv/i-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/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;
diff --git a/tests/seq/basic b/tests/seq/basic
index 8740dfa92..1bcece00b 100755
--- a/tests/seq/basic
+++ b/tests/seq/basic
@@ -4,13 +4,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"
- exit 77
- ;;
-esac
+$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
+}
d=$srcdir/..
exec $PERL -w -I$d -MFetish -- - << \EOF
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;
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
diff --git a/tests/tsort/basic-1 b/tests/tsort/basic-1
index 99b1fedd2..a70830c58 100755
--- a/tests/tsort/basic-1
+++ b/tests/tsort/basic-1
@@ -4,13 +4,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
#/
diff --git a/tests/unexpand/basic-1 b/tests/unexpand/basic-1
index 8640e981c..e366f49fa 100755
--- a/tests/unexpand/basic-1
+++ b/tests/unexpand/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;