2 # Author: Marek Rouchal <marek@saftsack.fs.uni-bayreuth.de>
8 BEGIN { plan tests => 4 }
10 use Pod::Find qw(pod_find pod_where);
17 my $THISDIR = Cwd::cwd();
20 print "*** searching $THISDIR/lib\n";
21 my %pods = pod_find("$THISDIR/lib");
22 my $result = join(',', sort values %pods);
23 print "*** found $result\n";
24 my $compare = join(',', qw(
36 # File::Find is located in this place since eons
37 # and on all platforms, hopefully
39 print "*** searching for File::Find\n";
40 $result = pod_where({ -inc => 1, -verbose => $VERBOSE }, 'File::Find')
41 || 'undef - pod not found!';
42 print "*** found $result\n";
45 $compare = File::Spec->catfile($Config::Config{privlib},"File","Find.pm");
46 ok(_canon($result),_canon($compare));
48 # Search for a documentation pod rather than a module
49 print "*** searching for perlfunc.pod\n";
50 $result = pod_where({ -inc => 1, -verbose => $VERBOSE }, 'perlfunc')
51 || 'undef - perlfunc.pod not found!';
52 print "*** found $result\n";
54 $compare = File::Spec->catfile($Config::Config{privlib},"perlfunc.pod");
55 ok(_canon($result),_canon($compare));
57 # make the path as generic as possible
61 $path = File::Spec->canonpath($path);
62 my @comp = File::Spec->splitpath($path);
63 my @dir = File::Spec->splitdir($comp[1]);
64 $comp[1] = File::Spec->catdir(@dir);
65 $path = File::Spec->catpath(@dir);
66 $path = uc($path) if File::Spec->case_tolerant;