3
use Pod::Simple::Search;
5
BEGIN { plan tests => 4 }
8
": Testing limit_glob ...\n";
10
my $x = Pod::Simple::Search->new;
11
die "Couldn't make an object!?" unless ok defined $x;
19
print "# CWD: $cwd\n";
21
my($here1, $here2, $here3);
23
if( -e ($here1 = File::Spec->catdir($cwd, 'test^lib' ))) {
24
die "But where's $here2?"
25
unless -e ($here2 = File::Spec->catdir($cwd, 'other^test^lib'));
26
die "But where's $here3?"
27
unless -e ($here3 = File::Spec->catdir($cwd, 'yet^another^test^lib'));
29
} elsif( -e ($here1 = File::Spec->catdir($cwd, 't', 'test^lib' ))) {
30
die "But where's $here2?"
31
unless -e ($here2 = File::Spec->catdir($cwd, 't', 'other^test^lib'));
32
die "But where's $here3?"
33
unless -e ($here3 = File::Spec->catdir($cwd, 't', 'yet^another^test^lib'));
36
die "Can't find the test corpora";
38
print "# OK, found the test corpora\n# as $here1\n# and $here2\n# and $here3\n#\n";
41
print $x->_state_as_string;
45
*pretty = \&Pod::Simple::BlackBox::pretty;
48
print "# Limiting to $glob\n";
49
$x->limit_glob($glob);
51
my($name2where, $where2name) = $x->survey($here1, $here2, $here3);
53
my $p = pretty( $where2name, $name2where )."\n";
59
my $names = join "|", sort values %$where2name;
60
ok $names, "Zonk::Pronk|perlzuk|zikzik";
64
print "# OK, bye from ", __FILE__, "\n";