summaryrefslogtreecommitdiff
path: root/tests/factor
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2007-08-18 08:50:00 +0200
committerJim Meyering <jim@meyering.net>2007-08-18 08:53:31 +0200
commitb78c6b68f77d55b6aeb57853a2f5e2bf312584c1 (patch)
treead6065ca95bf0aeb5a9a4601c3220b0c42b97a17 /tests/factor
parentd2e5e366a1d813e5ce2d03e250eb1ebe44473b63 (diff)
downloadcoreutils-b78c6b68f77d55b6aeb57853a2f5e2bf312584c1.tar.xz
Run each Coreutils.pm-based test in its own subdirectory.
* tests/CuTmpdir.pm: New file. * tests/Makefile.am (EXTRA_DIST): Add CuTmpdir.pm. * tests/misc/od, tests/misc/base64, tests/misc/basename: * tests/misc/cut, tests/misc/date, tests/misc/dirname: * tests/misc/expand, tests/misc/fold, tests/misc/head-elide-tail: * tests/misc/paste-no-nl, tests/misc/pr, tests/misc/sha224sum: * tests/misc/sha256sum, tests/misc/sha384sum, tests/misc/sha512sum: * tests/misc/sort-merge, tests/misc/stat-printf, tests/misc/test-diag: * tests/misc/wc-files0-from, tests/misc/xstrtol: * tests/dd/skip-seek, tests/dircolors/simple, tests/du/files0-from: * tests/expr/basic, tests/factor/basic, tests/fmt/basic: * tests/ls-2/tests, tests/md5sum/basic-1, tests/md5sum/newline-1: * tests/seq/basic, tests/sha1sum/basic-1, tests/sha1sum/sample-vec: * tests/sum/basic-1, tests/tsort/basic-1, tests/unexpand/basic-1: * tests/mv/i-1, tests/rm/empty-name, tests/rm/unreadable: Use it. * tests/misc/test-diag: Use "$ENV{abs_top_builddir}/src/test", not "../../src/test", so it works when run from a subdirectory. * tests/ls-2/tests: Create temp files and dirs from within the perl script, so that they're removed, when run from a subdirectory.
Diffstat (limited to 'tests/factor')
-rwxr-xr-xtests/factor/basic6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/factor/basic b/tests/factor/basic
index 20cac0dd5..bd2cc0851 100755
--- a/tests/factor/basic
+++ b/tests/factor/basic
@@ -2,7 +2,7 @@
# -*-perl-*-
# Basic tests for "factor".
-# Copyright (C) 1998, 1999, 2000, 2003, 2004, 2005 Free Software
+# Copyright (C) 1998, 1999, 2000, 2003, 2004, 2005, 2007 Free Software
# Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
@@ -27,8 +27,8 @@ $PERL -e 1 > /dev/null 2>&1 || {
exit 77
}
-d=$srcdir/..
-exec $PERL -w -I$d -MCoreutils -- - << \EOF
+me=`echo $0|sed 's,.*/,,'`
+exec $PERL -w -I$srcdir/.. -MCoreutils -M"CuTmpdir qw($me)" -- - << \EOF
require 5.003;
use strict;