use Config;
use File::Spec;
-plan tests => 82;
+plan tests => 88;
my $Perl = which_perl();
SKIP: {
skip "mtime and ctime not reliable", 2
- if $Is_MSWin32 or $Is_NetWare or $Is_Cygwin or $Is_Dos or $Is_MacOS;
+ if $Is_MSWin32 or $Is_NetWare or $Is_Cygwin or $Is_Dos or $Is_MacOS or $Is_Darwin;
ok( $mtime, 'mtime' );
is( $mtime, $ctime, 'mtime == ctime' );
# truncate and touch $tmpfile.
open(F, ">$tmpfile") || DIE("Can't open temp test file: $!");
+ok(-z \*F, '-z on empty filehandle');
+ok(! -s \*F, ' and -s');
close F;
ok(-z $tmpfile, '-z on empty file');
print F "hi\n";
close F;
+open(F, "<$tmpfile") || DIE("Can't open temp test file: $!");
+ok(!-z *F, '-z on empty filehandle');
+ok( -s *F, ' and -s');
+close F;
+
ok(! -z $tmpfile, '-z on non-empty file');
ok(-s $tmpfile, ' and -s');
unlink $tmpfile;
}
+SKIP: {
+ skip "No dirfd()", 2 unless $Config{d_dirfd};
+ opendir my $dir, "." or die 'Unable to opendir ".": $!';
+ ok(stat($dir), "stat() on dirhandle works");
+ ok(-d -r _ , "chained -x's on dirhandle");
+}
+
END {
1 while unlink $tmpfile;
}