Skip to content

Commit

Permalink
some people have broken systems that have perl but not perldoc, make …
Browse files Browse the repository at this point in the history
…the tests work for them
  • Loading branch information
DrHyde committed Oct 27, 2020
1 parent 7d9fab2 commit 3d410b2
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 6 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG
@@ -1,3 +1,5 @@
3.01 2020-10-27 Patch for broken systems that don't have perldoc

3.00 2020-10-27 configure_requires is now on by default (and can't be
switched off either);
Support multiple CPAN mirrors;
Expand Down
2 changes: 1 addition & 1 deletion lib/CPAN/FindDependencies.pm
Expand Up @@ -21,7 +21,7 @@ require Exporter;
@ISA = qw(Exporter);
@EXPORT_OK = qw(finddeps);

$VERSION = '3.00';
$VERSION = '3.01';

use constant MAXINT => ~0;

Expand Down
2 changes: 1 addition & 1 deletion lib/CPAN/FindDependencies/Dependency.pm
Expand Up @@ -7,7 +7,7 @@ use warnings;

use vars qw($VERSION);

$VERSION = '3.00';
$VERSION = '3.01';

=head1 NAME
Expand Down
5 changes: 4 additions & 1 deletion t/cpandeps-diff-script.t
Expand Up @@ -20,6 +20,9 @@ END {
SKIP: {
skip "Windows is just weird", 1
if(Devel::CheckOS::os_is('MicrosoftWindows'));
my($stdout, $stderr) = capture { system( qw(perldoc foo) ) };
skip "Your perl is broken. $stderr", 1
if($stderr =~ /You need to install the perl-doc package to use this program/);

my @default_cmd = (
$Config{perlpath}, (map { "-I$_" } (@INC)),
Expand All @@ -29,7 +32,7 @@ my @default_cmd = (

my @mirror = qw(mirror t/mirrors/privatemirror);

my($stdout, $stderr) = capture { system( @default_cmd, 'help') };
($stdout, $stderr) = capture { system( @default_cmd, 'help') };
like($stdout, qr/cpandeps-diff add Some::Module/, "Can spew out some help");

($stdout, $stderr) = capture { system( @default_cmd, 'list') };
Expand Down
10 changes: 7 additions & 3 deletions t/cpandeps-script.t
Expand Up @@ -6,7 +6,6 @@ use CPAN::FindDependencies qw(finddeps);

use Test::More;
use Test::Differences;
plan tests => 6;

use Devel::CheckOS;
use Capture::Tiny qw(capture);
Expand Down Expand Up @@ -35,10 +34,13 @@ use Config;
}

SKIP: {
skip "Script works but tests don't on Windows. Dunno why.", 5
skip "Script works but tests don't on Windows. Dunno why.", 1
if(Devel::CheckOS::os_is('MicrosoftWindows'));
my($stdout, $stderr) = capture { system( qw(perldoc foo) ) };
skip "Your perl is broken. $stderr", 1
if($stderr =~ /You need to install the perl-doc package to use this program/);

my($stdout, $stderr) = capture { system(
($stdout, $stderr) = capture { system(
$Config{perlpath}, (map { "-I$_" } (@INC)),
qw(
blib/script/cpandeps
Expand Down Expand Up @@ -101,3 +103,5 @@ eq_or_diff($stdout, 'CPAN::FindDependencies (dist: D/DC/DCANTRELL/CPAN-FindDepen
', "got CPAN::FindDependencies right");

};

done_testing;

0 comments on commit 3d410b2

Please sign in to comment.