summaryrefslogtreecommitdiff
path: root/t/pod
diff options
context:
space:
mode:
authorJerry D. Hedden <jdhedden@cpan.org>2009-02-02 21:25:38 +0000
committerNicholas Clark <nick@ccl4.org>2009-02-02 21:25:38 +0000
commit767c16ab361d1225fb153423fb22b590c1e0c7ea (patch)
treed13dd9bae385c208b6bc8d275748102f589b2813 /t/pod
parent440530af1a2c3ef817725c0837bb0b5f1348389a (diff)
downloadperl-767c16ab361d1225fb153423fb22b590c1e0c7ea.tar.gz
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.
Diffstat (limited to 't/pod')
-rw-r--r--t/pod/pod2usage2.t6
1 files changed, 5 insertions, 1 deletions
diff --git a/t/pod/pod2usage2.t b/t/pod/pod2usage2.t
index 98a6ba981f..4cd75de14c 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");