From: Gurusamy Sarathy Date: Wed, 31 May 2000 04:41:33 +0000 (+0000) Subject: change#6142 needs tweaks to tests to work where there's no symlink() X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=5eb85357989417f39c9b142b6f053d886d09816b;p=p5sagit%2Fp5-mst-13.2.git change#6142 needs tweaks to tests to work where there's no symlink() (from Helmut Jarausch ) p4raw-link: @6142 on //depot/perl: 704ea872433dd6d5a1c650f509289fdea5c037ab p4raw-id: //depot/perl@6170 --- diff --git a/t/lib/filefind.t b/t/lib/filefind.t index b4615cc..ca12e74 100755 --- a/t/lib/filefind.t +++ b/t/lib/filefind.t @@ -19,6 +19,7 @@ finddepth(sub { print "ok 2\n" if $_ eq 'filefind.t'; }, "."); my $case = 2; +my $FastFileTests_OK = 0; END { unlink 'fa/fa_ord','fa/fsl','fa/faa/faa_ord', @@ -57,8 +58,13 @@ sub wanted { print "# '$_' => 1\n"; s#\.$## if ($^O eq 'VMS' && $_ ne '.'); Check( $Expect{$_} ); - delete $Expect{$_} - unless ( $Expect_Dir{$_} && ! -d _ ); + if ( $FastFileTests_OK ) { + delete $Expect{$_} + unless ( $Expect_Dir{$_} && ! -d _ ); + } else { + delete $Expect{$_} + unless ( $Expect_Dir{$_} && ! -d $_ ); + } $File::Find::prune=1 if $_ eq 'faba'; } @@ -148,6 +154,7 @@ File::Find::finddepth( {wanted => \&d_wanted, no_chdir => 1 },'.' ); Check( scalar(keys %Expect) == 0 ); if ( $symlink_exists ) { + $FastFileTests_OK= 1; %Expect=('.' => 1, 'fa_ord' => 1, 'fsl' => 1, 'fb_ord' => 1, 'fba' => 1, 'fba_ord' => 1, 'fab' => 1, 'fab_ord' => 1, 'faba' => 1, 'faa' => 1, 'faa_ord' => 1);