diff options
author | Nicholas Clark <nick@ccl4.org> | 2002-09-08 20:45:52 +0100 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2002-09-09 19:33:11 +0000 |
commit | 912440bebca4a2e8a42a1d56c8be458397341faf (patch) | |
tree | f3d03663f2bf241a1ea14ac4dca610714cf65473 /lib | |
parent | c7de4c6618c94666be04e5ac0b48fa329c22560b (diff) | |
download | perl-912440bebca4a2e8a42a1d56c8be458397341faf.tar.gz |
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
Diffstat (limited to 'lib')
-rw-r--r-- | lib/File/Find/t/find.t | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/lib/File/Find/t/find.t b/lib/File/Find/t/find.t index c28183348f..4e5a217caa 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; |