diff options
author | Jim Meyering <meyering@redhat.com> | 2007-12-06 14:21:51 +0100 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2008-02-09 10:30:33 +0100 |
commit | 5282e54c08883cf4ab7ddb3b1874344ff32e5df7 (patch) | |
tree | befa40555cfbe06ea5a2962605c8edf28798a0e2 /tests/rm | |
parent | 72565ddffe0b249fc23bd8253564aaf3311f833c (diff) | |
download | coreutils-5282e54c08883cf4ab7ddb3b1874344ff32e5df7.tar.xz |
tests: factor out the perl-requiring code in many test scripts
* tests/require-perl: New file.
* tests/Makefile.am (EXTRA_DIST): Add require-perl.
* tests/dd/skip-seek: Use it, and remove manual tests.
* tests/du/files0-from: Likewise.
* tests/ls/nameless-uid: Likewise.
* tests/misc/base64: Likewise.
* tests/misc/basename: Likewise.
* tests/misc/cut: Likewise.
* tests/misc/date: Likewise.
* tests/misc/dircolors: Likewise.
* tests/misc/dirname: Likewise.
* tests/misc/expand: Likewise.
* tests/misc/expr: Likewise.
* tests/misc/factor: Likewise.
* tests/misc/fmt: Likewise.
* tests/misc/fold: Likewise.
* tests/misc/head-elide-tail: Likewise.
* tests/misc/ls-misc: Likewise.
* tests/misc/md5sum: Likewise.
* tests/misc/md5sum-newline: Likewise.
* tests/misc/mktemp: Likewise.
* tests/misc/od: Likewise.
* tests/misc/paste-no-nl: Likewise.
* tests/misc/pr: Likewise.
* tests/misc/pwd-long: Likewise.
* tests/misc/seq: Likewise.
* tests/misc/sha1sum: Likewise.
* tests/misc/sha1sum-vec: Likewise.
* tests/misc/sha224sum: Likewise.
* tests/misc/sha256sum: Likewise.
* tests/misc/sha384sum: Likewise.
* tests/misc/sha512sum: Likewise.
* tests/misc/sort-merge: Likewise.
* tests/misc/stat-printf: Likewise.
* tests/misc/sum: Likewise.
* tests/misc/sum-sysv: Likewise.
* tests/misc/test-diag: Likewise.
* tests/misc/tsort: Likewise.
* tests/misc/tty-eof: Likewise.
* tests/misc/unexpand: Likewise.
* tests/misc/wc-files0-from: Likewise.
* tests/misc/xstrtol: Likewise.
* tests/mv/i-1: Likewise.
* tests/rm/empty-name: Likewise.
* tests/rm/fail-eperm: Likewise.
* tests/rm/unreadable: Likewise.
(EXTRA_DIST): *do* require require-perl as a stand-alone, 'source'able script.
Diffstat (limited to 'tests/rm')
-rwxr-xr-x | tests/rm/empty-name | 5 | ||||
-rwxr-xr-x | tests/rm/fail-eperm | 5 | ||||
-rwxr-xr-x | tests/rm/unreadable | 5 |
3 files changed, 3 insertions, 12 deletions
diff --git a/tests/rm/empty-name b/tests/rm/empty-name index 1384a2fd1..a250985c9 100755 --- a/tests/rm/empty-name +++ b/tests/rm/empty-name @@ -21,11 +21,8 @@ # actually remove files with names of entries in the current directory # but relative to `/' rather than relative to the current directory. -: ${PERL=perl} : ${srcdir=.} - -$PERL -e 'use warnings;' > /dev/null 2>&1 || - skip_test_ "configure didn't find a usable version of Perl" +. $srcdir/../require-perl me=`echo $0|sed 's,.*/,,'` exec $PERL -w -I$srcdir/.. -MCoreutils -M"CuTmpdir qw($me)" -- - << \EOF diff --git a/tests/rm/fail-eperm b/tests/rm/fail-eperm index c619574ce..4abc9dec6 100755 --- a/tests/rm/fail-eperm +++ b/tests/rm/fail-eperm @@ -29,11 +29,8 @@ fi PRIV_CHECK_ARG=require-non-root . $srcdir/../priv-check -: ${PERL=perl} : ${srcdir=.} - -$PERL -e 1 > /dev/null 2>&1 || - skip_test_ "configure didn't find a usable version of Perl" +. $srcdir/../require-perl ARGV_0=$0 export ARGV_0 diff --git a/tests/rm/unreadable b/tests/rm/unreadable index 05024c2dc..4fb40235c 100755 --- a/tests/rm/unreadable +++ b/tests/rm/unreadable @@ -16,11 +16,8 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -: ${PERL=perl} : ${srcdir=.} - -$PERL -e 'use warnings;' > /dev/null 2>&1 || - skip_test_ "configure didn't find a usable version of Perl" +. $srcdir/../require-perl me=`echo $0|sed 's,.*/,,'` exec $PERL -w -I$srcdir/.. -MCoreutils -M"CuTmpdir qw($me)" -- - << \EOF |