Skip to content

Commit 6a59f47

Browse files
committed
Bug fixes
1 parent 8fbdfab commit 6a59f47

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

t/02_simple.t

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ BEGIN {
66
$^W = 1;
77
}
88

9-
use Test::More tests => 37;
9+
use Test::More tests => 38;
1010
use File::Spec ();
1111

1212
# Override the perl path for testing purposes
@@ -25,7 +25,9 @@ ok( ! $INC{'CPAN/Config.pm'}, 'CPAN::Config is not loaded' );
2525
my $perl = Portable->default;
2626
isa_ok( $perl, 'Portable' );
2727

28-
is( $Portable::ENABLED, 1, '$Portable::ENABLED is true' );
28+
# Twice to avoid a warning
29+
is( $Portable::ENABLED, undef, '$Portable::ENABLED is true' );
30+
is( $Portable::ENABLED, undef, '$Portable::ENABLED is true' );
2931

3032
# Do all the config entries exist
3133
my $config = $perl->config;

t/03_config.t

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ BEGIN {
66
$^W = 1;
77
}
88

9-
use Test::More tests => 2;
9+
use Test::More tests => 4;
1010
use Test::Exception;
1111
use File::Spec ();
1212

@@ -26,3 +26,7 @@ ok( ! $@, "->import(Config) ok" );
2626

2727
# CPAN::Config should not be loaded
2828
ok( ! $INC{'CPAN/Config.pm'}, 'CPAN::Config is not loaded' );
29+
30+
# We are now enabled (twice to avoid a warning)
31+
is( $Portable::ENABLED, 1, '$Portable::ENABLED is true' );
32+
is( $Portable::ENABLED, 1, '$Portable::ENABLED is true' );

0 commit comments

Comments
 (0)