From 2ca571f439610d1ce38c8fbcb4bb638b2d881be1 Mon Sep 17 00:00:00 2001 From: Nicholas Clark Date: Wed, 13 Jun 2012 15:53:27 +0200 Subject: [PATCH] Remove needless skip tests from lib/File/stat.t The stat builtin is always implemented, so no need for an eval {} test to check for this. The presence or absence of at the C level isn't going to affect the outcome of this test. Both have been in the test script since it was added (as t/lib/filestat.t) by commit f7a45afb043dafc5 in May 2001. I suspect that both were copied from one of the Net::* test scripts which was being used as the template. --- lib/File/stat.t | 8 -------- 1 file changed, 8 deletions(-) diff --git a/lib/File/stat.t b/lib/File/stat.t index b5157b8..c3ecc09 100644 --- a/lib/File/stat.t +++ b/lib/File/stat.t @@ -27,14 +27,6 @@ BEGIN { $file = readlink $file; die "Can't readlink(../lib/File/stat.t): $!" if ! defined $file; } - - our $hasst; - eval { my @n = stat $file }; - $hasst = 1 unless $@ && $@ =~ /unimplemented/; - unless ($hasst) { plan skip_all => "no stat"; exit 0 } - use Config; - $hasst = 0 unless $Config{'i_sysstat'} eq 'define'; - unless ($hasst) { plan skip_all => "no sys/stat.h"; exit 0 } } # Originally this was done in the BEGIN block, but perl is still -- 2.7.4