diff options
author | Steve Peters <steve@fisharerojo.org> | 2006-07-03 18:09:01 +0000 |
---|---|---|
committer | Steve Peters <steve@fisharerojo.org> | 2006-07-03 18:09:01 +0000 |
commit | 5228a96c60a47c008c307f4fa3bf942383d38423 (patch) | |
tree | 70ae56d50266f791be5436a6f593a84a7cf33c94 /t/op/stat.t | |
parent | 88e01c9dba7e9c1403ea12dc83a20252782bb76f (diff) | |
download | perl-5228a96c60a47c008c307f4fa3bf942383d38423.tar.gz |
Allow stat() and -X file tests work on dirhandles.
p4raw-id: //depot/perl@28473
Diffstat (limited to 't/op/stat.t')
-rwxr-xr-x | t/op/stat.t | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/t/op/stat.t b/t/op/stat.t index c2d373145e..dac326aff0 100755 --- a/t/op/stat.t +++ b/t/op/stat.t @@ -9,7 +9,7 @@ BEGIN { use Config; use File::Spec; -plan tests => 86; +plan tests => 88; my $Perl = which_perl(); @@ -479,6 +479,13 @@ ok(unlink($f), 'unlink tmp file'); 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; } |