Change 17884 by rgs@rgs-home on 2002/09/09 19:33:11 Subject: [PATCH] File/Find/t/find.t tests 1 and 2 (was Re: [perl #17061] no strict 'garbage') From: Nicholas Clark <[EMAIL PROTECTED]> Date: Sun, 8 Sep 2002 19:45:52 +0100 Message-ID: <[EMAIL PROTECTED]>
Affected files ... .... //depot/perl/lib/File/Find/t/find.t#10 edit Differences ... ==== //depot/perl/lib/File/Find/t/find.t#10 (text) ==== Index: perl/lib/File/Find/t/find.t --- perl/lib/File/Find/t/find.t#9~15167~ Sun Mar 10 20:57:20 2002 +++ perl/lib/File/Find/t/find.t Mon Sep 9 12:33:11 2002 @@ -51,12 +51,23 @@ cleanup(); -find({wanted => sub { print "ok 1\n" if $_ eq 'commonsense.t'; } }, +$::count_commonsense = 0; +find({wanted => sub { ++$::count_commonsense if $_ eq 'commonsense.t'; } }, File::Spec->curdir); +if ($::count_commonsense == 1) { + print "ok 1\n"; +} else { + print "not ok 1 # found $::count_commonsense files named 'commonsense.t'\n"; +} -finddepth({wanted => sub { print "ok 2\n" if $_ eq 'commonsense.t'; } }, +$::count_commonsense = 0; +finddepth({wanted => sub { ++$::count_commonsense if $_ eq 'commonsense.t'; } }, File::Spec->curdir); - +if ($::count_commonsense == 1) { + print "ok 2\n"; +} else { + print "not ok 2 # found $::count_commonsense files named 'commonsense.t'\n"; +} my $case = 2; my $FastFileTests_OK = 0; End of Patch.