From: Nicholas Clark Date: Sun, 8 Sep 2002 19:45:52 +0000 (+0100) Subject: File/Find/t/find.t tests 1 and 2 (was Re: [perl #17061] no strict 'garbage') X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=912440bebca4a2e8a42a1d56c8be458397341faf;p=p5sagit%2Fp5-mst-13.2.git File/Find/t/find.t tests 1 and 2 (was Re: [perl #17061] no strict 'garbage') Message-ID: <20020908184551.GH286@Bagpuss.unfortu.net> p4raw-id: //depot/perl@17884 --- diff --git a/lib/File/Find/t/find.t b/lib/File/Find/t/find.t index c281833..4e5a217 100644 --- a/lib/File/Find/t/find.t +++ b/lib/File/Find/t/find.t @@ -51,12 +51,23 @@ BEGIN { 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;