9 use Pod::Simple::Search;
11 BEGIN { plan tests => 11 }
14 ": Testing the scanning of several (well, two) docroots...\n";
16 my $x = Pod::Simple::Search->new;
17 die "Couldn't make an object!?" unless ok defined $x;
22 print "# ", join(" ", map "{$_}", @_), "\n";
29 print "# CWD: $cwd\n";
33 if ($ENV{PERL_CORE}) {
34 return "../lib/Pod/Simple/t/$file";
41 if( -e ($here1 = source_path('testlib1'))) {
42 die "But where's $here2?"
43 unless -e ($here2 = source_path('testlib2'));
44 } elsif( -e ($here1 = File::Spec->catdir($cwd, 't', 'testlib1' ))) {
45 die "But where's $here2?"
46 unless -e ($here2 = File::Spec->catdir($cwd, 't', 'testlib2'));
48 die "Can't find the test corpora";
50 print "# OK, found the test corpora\n# as $here1\n# and $here2\n";
53 print $x->_state_as_string;
57 *pretty = \&Pod::Simple::BlackBox::pretty;
59 print "# OK, starting run...\n# [[\n";
60 my($name2where, $where2name) = $x->survey($here1, $here2);
61 print "# ]]\n#OK, run done.\n";
63 my $p = pretty( $where2name, $name2where )."\n";
69 if( -e ($ascii_order = source_path('ascii_order.pl'))) {
71 } elsif(-e ($ascii_order = File::Spec->catfile($cwd, 't', 'ascii_order.pl'))) {
74 die "Can't find ascii_order.pl";
80 my $names = join "|", sort ascii_order values %$where2name;
81 skip $^O eq 'VMS' ? '-- case may or may not be preserved' : 0,
83 "Blorm|Suzzle|Zonk::Pronk|hinkhonk::Glunk|hinkhonk::Vliff|perlflif|perlthng|perlzuk|squaa|squaa::Glunk|squaa::Vliff|squaa::Wowo|zikzik";
87 my $names = join "|", sort ascii_order keys %$name2where;
88 skip $^O eq 'VMS' ? '-- case may or may not be preserved' : 0,
90 "Blorm|Suzzle|Zonk::Pronk|hinkhonk::Glunk|hinkhonk::Vliff|perlflif|perlthng|perlzuk|squaa|squaa::Glunk|squaa::Vliff|squaa::Wowo|zikzik";
93 ok( ($name2where->{'squaa'} || 'huh???'), '/squaa\.pm$/');
95 ok grep( m/squaa\.pm/, keys %$where2name ), 1;
97 ###### Now with recurse(0)
101 print "# OK, starting run without recurse...\n# [[\n";
102 ($name2where, $where2name) = $x->survey($here1, $here2);
103 print "# ]]\n#OK, run without recurse done.\n";
105 $p = pretty( $where2name, $name2where )."\n";
111 my $names = join "|", sort ascii_order values %$where2name;
112 skip $^O eq 'VMS' ? '-- case may or may not be preserved' : 0,
114 "Blorm|Suzzle|squaa|zikzik";
118 my $names = join "|", sort ascii_order keys %$name2where;
119 skip $^O eq 'VMS' ? '-- case may or may not be preserved' : 0,
121 "Blorm|Suzzle|squaa|zikzik";
124 ok( ($name2where->{'squaa'} || 'huh???'), '/squaa\.pm$/');
126 ok grep( m/squaa\.pm/, keys %$where2name ), 1;