use
Test::More
tests
=> 6 + (
$ENV
{AUTHOR_TESTING} ? 1 : 0);
my
@module_files
= (
'Parse/Path.pm'
,
'Parse/Path/DZIL.pm'
,
'Parse/Path/File/Unix.pm'
,
'Parse/Path/File/Win32.pm'
,
'Parse/Path/PerlClass.pm'
,
'Parse/Path/Role/Path.pm'
);
my
@warnings
;
for
my
$lib
(
@module_files
)
{
my
$stdin
=
''
;
my
$stderr
= IO::Handle->new;
my
$pid
= open3(
$stdin
,
'>&STDERR'
,
$stderr
,
qq{$^X -Mblib -e"require q[$lib]"}
);
binmode
$stderr
,
':crlf'
if
$^O;
waitpid
(
$pid
, 0);
is($? >> 8, 0,
"$lib loaded ok"
);
if
(
my
@_warnings
= <
$stderr
>)
{
warn
@_warnings
;
push
@warnings
,
@_warnings
;
}
}
is(
scalar
(
@warnings
), 0,
'no warnings found'
)
if
$ENV
{AUTHOR_TESTING};