App-Cmd
view release on metacpan or search on metacpan
t/setup-broken.t view on Meta::CPAN
use strict;
use warnings;
use Test::More 0.88;
use Test::Fatal;
use lib 't/lib';
ok( !exists $INC{'Test/BrokenCmd/Command.pm'}, 'Broken library not tried to load yet' );
ok( !exists $INC{'Test/BrokenCmd/Command::Notthere.pm'}, 'Missing library not tried to load yet' );
isnt(
exception {
require Test::BrokenCmd;
},
undef,
'using an obviously broken library should die'
);
{
local $TODO = "require 'works' after failing on pre-5.10" if $] < 5.010;
isnt(
exception {
require Test::BrokenCmd::Command;
},
undef,
'the broken library is broken'
);
}
ok( exists $INC{'Test/BrokenCmd/Command.pm'}, 'Broken library tried to load' );
ok( !exists $INC{'Test/BrokenCmd/Command::Notthere.pm'}, 'Missing library not tried to load yet' );
done_testing;
( run in 1.347 second using v1.01-cache-2.11-cpan-54e63673c56 )