From: Gurusamy Sarathy Date: Thu, 9 Dec 1999 10:51:43 +0000 (+0000) Subject: fix File::Find testsuite bugs in symlink-less places X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=fd886cf28287b15ed0a58a35d6b97b1c5775f738;p=p5sagit%2Fp5-mst-13.2.git fix File::Find testsuite bugs in symlink-less places p4raw-id: //depot/perl@4676 --- diff --git a/t/lib/filefind.t b/t/lib/filefind.t index 8295eaf..f958b19 100755 --- a/t/lib/filefind.t +++ b/t/lib/filefind.t @@ -10,7 +10,7 @@ BEGIN { } if ( $symlink_exists ) { print "1..59\n"; } -else { print "1..34\n"; } +else { print "1..31\n"; } use File::Find; @@ -52,7 +52,7 @@ sub MkDir($$) { } sub wanted { -# print "'$_' => 1, "; + print "# '$_' => 1\n"; Check( $Expect{$_} ); delete $Expect{$_}; $File::Find::prune=1 if $_ eq 'FABA'; @@ -73,14 +73,16 @@ touch('FA/FAB/FAB_ord'); MkDir( 'FA/FAB/FABA',0770 ); touch('FA/FAB/FABA/FABA_ord'); -%Expect=('.' => 1, 'FSL' => 1, 'FA_ord' => 1, 'FAB' => 1, 'FAB_ord' => 1, 'FABA' => 1, - 'FAA' => 1, 'FAA_ord' => 1); - +%Expect = ('.' => 1, 'FSL' => 1, 'FA_ord' => 1, 'FAB' => 1, 'FAB_ord' => 1, + 'FABA' => 1, 'FAA' => 1, 'FAA_ord' => 1); +delete $Expect{'FSL'} unless $symlink_exists; File::Find::find( {wanted => \&wanted, },'FA' ); Check( scalar(keys %Expect) == 0 ); -%Expect=('FA' => 1, 'FA/FSL' => 1, 'FA/FA_ord' => 1, 'FA/FAB' => 1, 'FA/FAB/FAB_ord' => 1, - 'FA/FAB/FABA' => 1, 'FA/FAB/FABA/FABA_ord' => 1, 'FA/FAA' => 1, 'FA/FAA/FAA_ord' => 1); +%Expect=('FA' => 1, 'FA/FSL' => 1, 'FA/FA_ord' => 1, 'FA/FAB' => 1, + 'FA/FAB/FAB_ord' => 1, 'FA/FAB/FABA' => 1, + 'FA/FAB/FABA/FABA_ord' => 1, 'FA/FAA' => 1, 'FA/FAA/FAA_ord' => 1); +delete $Expect{'FA/FSL'} unless $symlink_exists; File::Find::find( {wanted => \&wanted, no_chdir => 1},'FA' ); Check( scalar(keys %Expect) == 0 );