summaryrefslogtreecommitdiff
path: root/t/lib
diff options
context:
space:
mode:
authorDavid Dyck <david.dyck@fluke.com>2001-05-29 15:05:28 -0700
committerJarkko Hietaniemi <jhi@iki.fi>2001-05-30 12:32:17 +0000
commit78eac027d0b109ebff3f99202cc1a91813238357 (patch)
tree6bc82be3bdffa28232b29fbae33a39a06492bfb8 /t/lib
parent39816196b8dc3f31d97af98e7fb0423099aba6b4 (diff)
downloadperl-78eac027d0b109ebff3f99202cc1a91813238357.tar.gz
Re: [ID 20010529.003] find2perl and File::Find doesn't emulate find when path is a symlink (patch to t/lib/filefind.t as requested)
Message-ID: <Pine.LNX.4.33.0105292200060.26992-100000@dd.tc.fluke.com> p4raw-id: //depot/perl@10313
Diffstat (limited to 't/lib')
-rwxr-xr-xt/lib/filefind.t11
1 files changed, 10 insertions, 1 deletions
diff --git a/t/lib/filefind.t b/t/lib/filefind.t
index de322f84c3..72e2669ad0 100755
--- a/t/lib/filefind.t
+++ b/t/lib/filefind.t
@@ -9,7 +9,7 @@ BEGIN {
@INC = '../lib';
}
-if ( $symlink_exists ) { print "1..117\n"; }
+if ( $symlink_exists ) { print "1..119\n"; }
else { print "1..61\n"; }
use File::Find;
@@ -203,6 +203,15 @@ if ( $symlink_exists ) {
File::Find::finddepth( {wanted => \&d_wanted, follow_fast => 1, no_chdir => 1},'fa' );
Check( scalar(keys %Expect) == 0 );
+
+ # Verify that File::Find::find will call wanted even if the topdir of
+ # is a symlink to a directory, and it shouldn't follow the link
+ # unless follow is set, which it isn't in this case
+ %Expect = ('fsl' => 1);
+ %Expect_Dir = ();
+ File::Find::find( {wanted => \&wanted, },'fa/fsl' );
+ Check( scalar(keys %Expect) == 0 );
+
}
print "# of cases: $case\n";