summaryrefslogtreecommitdiff
path: root/tests/misc/dirname
diff options
context:
space:
mode:
Diffstat (limited to 'tests/misc/dirname')
-rwxr-xr-xtests/misc/dirname12
1 files changed, 2 insertions, 10 deletions
diff --git a/tests/misc/dirname b/tests/misc/dirname
index 0530175bf..6b9a8d7b7 100755
--- a/tests/misc/dirname
+++ b/tests/misc/dirname
@@ -17,16 +17,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=.}
-
-PROG=`echo $0|sed 's,.*/,,'`; export PROG
-
-$PERL -e 'use warnings;' > /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
-}
+. $srcdir/../require-perl
me=`echo $0|sed 's,.*/,,'`
exec $PERL -w -I$srcdir/.. -MCoreutils -M"CuTmpdir qw($me)" -- - << \EOF
@@ -44,7 +36,7 @@ my $stat_double = stat('//');
my $double_slash = ($stat_single->dev == $stat_double->dev
&& $stat_single->ino == $stat_double->ino) ? '/' : '//';
-my $prog = $ENV{PROG} || die "$0: \$PROG not specified in environment\n";
+my $prog = 'dirname';
my @Tests =
(