9 use Pod::Simple::Search;
11 BEGIN { plan tests => 5 }
15 # "kleene" rhymes with "zany". It's a fact!
20 ": Testing limit_glob ...\n";
22 my $x = Pod::Simple::Search->new;
23 die "Couldn't make an object!?" unless ok defined $x;
31 print "# CWD: $cwd\n";
35 if ($ENV{PERL_CORE}) {
36 my $updir = File::Spec->updir;
37 my $dir = File::Spec->catdir($updir, 'lib', 'Pod', 'Simple', 't');
38 return File::Spec->catdir ($dir, $file);
44 my($here1, $here2, $here3);
46 if( -e ($here1 = source_path( 'test_lib' ))) {
47 die "But where's $here2?"
48 unless -e ($here2 = source_path ( 'other_test_lib'));
49 die "But where's $here3?"
50 unless -e ($here3 = source_path( 'yet_another_test_lib'));
52 } elsif( -e ($here1 = File::Spec->catdir($cwd, 't', 'test_lib' ))) {
53 die "But where's $here2?"
54 unless -e ($here2 = File::Spec->catdir($cwd, 't', 'other_test_lib'));
55 die "But where's $here3?"
56 unless -e ($here3 = File::Spec->catdir($cwd, 't', 'yet_another_test_lib'));
59 die "Can't find the test corpora";
61 print "# OK, found the test corpora\n# as $here1\n# and $here2\n# and $here3\n#\n";
64 print $x->_state_as_string;
68 *pretty = \&Pod::Simple::BlackBox::pretty;
71 print "# Limiting to $glob\n";
72 $x->limit_glob($glob);
74 my($name2where, $where2name) = $x->survey($here1, $here2, $here3);
76 my $p = pretty( $where2name, $name2where )."\n";
82 my $names = join "|", sort keys %$name2where;
83 ok $names, "Zonk::Pronk|hink_honk::Glunk|perlzuk|squaa::Glunk|zikzik";
87 my $names = join "|", sort values %$where2name;
88 ok $names, "Zonk::Pronk|hink_honk::Glunk|hink_honk::Glunk|perlzuk|squaa::Glunk|zikzik";
91 print "# OK, bye from ", __FILE__, "\n";