From: Jerry D. Hedden Date: Mon, 2 Feb 2009 21:25:38 +0000 (+0000) Subject: Make t/pod/pod2usage2.t work on case insensitive file systems. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=767c16ab361d1225fb153423fb22b590c1e0c7ea;p=p5sagit%2Fp5-mst-13.2.git Make t/pod/pod2usage2.t work on case insensitive file systems. pod_where() checks the current dir when looking for PODs when the -dirs option is not specified. Because of case-insensitivity under Cygwin, this causes t/pod/usage.pod to get found before lib/Pod/Usage.pm. The fix is to set -dir=>[] in pod_where() when testing in CORE under Cygwin. The attached patch does this. --- diff --git a/t/pod/pod2usage2.t b/t/pod/pod2usage2.t index 98a6ba9..4cd75de 100644 --- a/t/pod/pod2usage2.t +++ b/t/pod/pod2usage2.t @@ -223,7 +223,11 @@ EOT # test with pod_where use_ok('Pod::Find', qw(pod_where)); -($exit, $text) = getoutput( sub { pod2usage( -input => pod_where({-inc => 1}, 'Pod::Usage'), +# Exclude current dir when testing in CORE under Cygwin +my @NO_CURDIR = ($^O eq 'cygwin' && $ENV{PERL_CORE}) + ? ('-dirs' => []) + : (); +($exit, $text) = getoutput( sub { pod2usage( -input => pod_where({-inc => 1, @NO_CURDIR}, 'Pod::Usage'), -exitval => 0, -verbose => 0) } ); $text =~ s{#Using.*/blib.*\n}{}; # older blib's emit something to STDERR is ($exit, 0, "Exit status pod2usage with Pod::Find");