9 use Pod::Simple::Search;
11 BEGIN { plan tests => 7 }
14 ": Testing the surveying of the current directory...\n";
16 my $x = Pod::Simple::Search->new;
17 die "Couldn't make an object!?" unless ok defined $x;
24 print "# CWD: $cwd\n";
28 if ($ENV{PERL_CORE}) {
30 my $updir = File::Spec->updir;
31 my $dir = File::Spec->catdir($updir, 'lib', 'Pod', 'Simple', 't');
32 return File::Spec->catdir ($dir, $file);
39 if( -e ($here = source_path('testlib1'))) {
41 } elsif(-e ($here = File::Spec->catdir($cwd, 't', 'testlib1'))) {
44 die "Can't find the test corpus";
46 print "# OK, found the test corpus as $here\n";
49 print $x->_state_as_string;
53 *pretty = \&Pod::Simple::BlackBox::pretty;
55 my($name2where, $where2name) = $x->survey('.');
57 my $p = pretty( $where2name, $name2where )."\n";
63 my $names = join "|", sort values %$where2name;
64 ok $names, "Blorm|Zonk::Pronk|hinkhonk::Glunk|hinkhonk::Vliff|perlflif|perlthng|squaa|squaa::Glunk|squaa::Vliff|zikzik";
68 my $names = join "|", sort keys %$name2where;
69 ok $names, "Blorm|Zonk::Pronk|hinkhonk::Glunk|hinkhonk::Vliff|perlflif|perlthng|squaa|squaa::Glunk|squaa::Vliff|zikzik";
72 ok( ($name2where->{'squaa'} || 'huh???'), '/squaa\.pm$/');
74 ok grep( m/squaa\.pm/, keys %$where2name ), 1;