diff options
author | Jerry D. Hedden <jdhedden@cpan.org> | 2009-02-02 21:25:38 +0000 |
---|---|---|
committer | David Mitchell <davem@iabyn.com> | 2009-04-12 23:49:45 +0100 |
commit | 7506a0336371c2c6d3d4c98f1d04a61ff539ed4b (patch) | |
tree | 26f65aa2580d1eba44016820d9ce0fa19cf26480 /t/pod/pod2usage2.t | |
parent | c3af22112f8b5643f176acac7142bc809caf0ace (diff) | |
download | perl-7506a0336371c2c6d3d4c98f1d04a61ff539ed4b.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.
(cherry picked from commit 767c16ab361d1225fb153423fb22b590c1e0c7ea)
Diffstat (limited to 't/pod/pod2usage2.t')
-rw-r--r-- | t/pod/pod2usage2.t | 6 |
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"); |