Log-Shiras
view release on metacpan or search on metacpan
t/Log/Shiras/07-tap_warn.t view on Meta::CPAN
#!perl
#########1 Test File for Log::Shiras::Tapwarn 5#########6#########7#########8#########9
my ( $lib, $test_file );
BEGIN{
use Modern::Perl;
use Test2::Bundle::Extended qw( !meta );
use Test2::Plugin::UTF8;
plan( 25 );
my $file = (caller(0))[1];
my $directory_ref = {
t => './',# repo level
Log => '../',# t folder level
$file => '../../../',# test file level
};
for my $next ( <*> ){
#~ diag $next;
if( $next =~/^($file|t|Log)$/ ){
my $return = $1;
#~ diag $return;
$lib = $directory_ref->{$return} . 'lib';
$test_file = $directory_ref->{$return} . 't/test_files/';
#~ diag $lib;
#~ diag $test_file;
last;
}
}
$ENV{hide_warn} = 1;
}
$| = 1;
use lib $lib,;
use Capture::Tiny 0.12 qw( capture_stderr );
#~ use Log::Shiras::Unhide qw( :InternalTaPWarN );# :InternalSwitchboarD
use Log::Shiras::Report::Test2Note;
use Log::Shiras::Switchboard;
use Log::Shiras::TapWarn;
use Log::Shiras::Test2;
my @tap_warn_methods = qw(
re_route_warn
restore_warn
);
my (
$test_instance, $ella_peterson, $capture, $name_space_ref, $report_ref,
$test_class,
);
note "easy question first ...";
map{ #Check that all exported methods are available
can_ok 'Log::Shiras::TapWarn', $_,
} @tap_warn_methods;
ok $name_space_ref = {
UNBLOCK =>{
log_file => 'warn',
},
Log =>{
UNBLOCK =>{
log_file => 'warn',
},
Shiras =>{
Switchboard =>{
master_talk =>{
_add_caller =>{
UNBLOCK =>{
log_file => 'warn',
},
},
},
( run in 1.910 second using v1.01-cache-2.11-cpan-364913b4093 )