X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fpod%2Ffind.t;h=66b65c5c3995c7043dabf8ce7fb0ae114cc3906a;hb=3d66076ad00dfe06380fb774b92fb59dc07fe4ec;hp=20586014f159731bc6f561d30b12fcb95c72a0ff;hpb=16ed468695c21630f18883bfbedc3d5170ddc8b2;p=p5sagit%2Fp5-mst-13.2.git diff --git a/t/pod/find.t b/t/pod/find.t index 2058601..66b65c5 100644 --- a/t/pod/find.t +++ b/t/pod/find.t @@ -88,7 +88,6 @@ print "### found $result\n"; require Config; if ($^O eq 'VMS') { # privlib is perl_root:[lib] OK but not under mms - $result = VMS::Filespec::vmsify($result); #if you want VMS you need to force it. $compare = "lib.File]Find.pm"; $result =~ s/perl_root:\[\-?\.?//i; $result =~ s/\[\-?\.?//i; # needed under `mms test` @@ -102,31 +101,19 @@ else { } # Search for a documentation pod rather than a module -my $searchpod = $ENV{PERL_CORE} ? 'Stuff' : 'perlfunc'; +my $searchpod = 'Stuff'; print "### searching for $searchpod.pod\n"; -$result = pod_where($ENV{PERL_CORE} ? - { -dirs => [ File::Spec->catdir('pod', 'testpods', 'lib', 'Pod') ], - -verbose => $VERBOSE } - : { -inc => 1, -verbose => $VERBOSE }, $searchpod) +$result = pod_where( + { -dirs => [ File::Spec->catdir( + $ENV{PERL_CORE} ? () : qw(t), 'pod', 'testpods', 'lib', 'Pod') ], + -verbose => $VERBOSE }, $searchpod) || "undef - $searchpod.pod not found!"; print "### found $result\n"; -if($ENV{PERL_CORE}) { - $compare = File::Spec->catfile('pod', 'testpods', 'lib', 'Pod' ,'Stuff.pm'); - ok(_canon($result),_canon($compare)); -} -elsif ($^O eq 'VMS') { # privlib is perl_root:[lib] unfortunately - $compare = "/lib/pod/perlfunc.pod"; - $result = VMS::Filespec::unixify($result); - $result =~ s/perl_root\///i; - $result =~ s/^\.\.//; # needed under `mms test` - ok($result,$compare); -} -else { - $compare = File::Spec->catfile($Config::Config{privlib}, - ($^O =~ /macos|darwin|cygwin/i ? 'pods' : 'pod'),"perlfunc.pod"); - ok(_canon($result),_canon($compare)); -} +$compare = File::Spec->catfile( + $ENV{PERL_CORE} ? () : qw(t), + 'pod', 'testpods', 'lib', 'Pod' ,'Stuff.pm'); +ok(_canon($result),_canon($compare)); # make the path as generic as possible sub _canon