8 # Time-stamp: "2004-05-23 22:38:58 ADT"
12 #sub Pod::Simple::Search::DEBUG () {5};
14 use Pod::Simple::Search;
16 BEGIN { plan tests => 7 }
19 ": Testing the surveying of a single specified docroot...\n";
21 my $x = Pod::Simple::Search->new;
22 die "Couldn't make an object!?" unless ok defined $x;
24 print "# Testing the surveying of the current directory...\n";
31 print "# CWD: $cwd\n";
35 if ($ENV{PERL_CORE}) {
37 my $updir = File::Spec->updir;
38 my $dir = File::Spec->catdir($updir, 'lib', 'Pod', 'Simple', 't');
39 return File::Spec->catdir ($dir, $file);
46 if( -e ($here = source_path('testlib1'))) {
48 } elsif(-e ($here = File::Spec->catdir($cwd, 't', 'testlib1'))) {
51 die "Can't find the test corpus";
53 print "# OK, found the test corpus as $here\n";
56 print $x->_state_as_string;
60 *pretty = \&Pod::Simple::BlackBox::pretty;
62 my($name2where, $where2name) = $x->survey($here);
64 my $p = pretty( $where2name, $name2where )."\n";
70 my $names = join "|", sort values %$where2name;
71 ok $names, "Blorm|Zonk::Pronk|hinkhonk::Glunk|hinkhonk::Vliff|perlflif|perlthng|squaa|squaa::Glunk|squaa::Vliff|zikzik";
75 my $names = join "|", sort keys %$name2where;
76 ok $names, "Blorm|Zonk::Pronk|hinkhonk::Glunk|hinkhonk::Vliff|perlflif|perlthng|squaa|squaa::Glunk|squaa::Vliff|zikzik";
79 ok( ($name2where->{'squaa'} || 'huh???'), '/squaa\.pm$/');
81 ok grep( m/squaa\.pm/, keys %$where2name ), 1;