2019-02-21 22:30:49 +03:00
|
|
|
use lib 'lib';
|
|
|
|
use strict;
|
|
|
|
use warnings;
|
|
|
|
|
|
|
|
use Test::More;
|
|
|
|
use Test::Fatal;
|
|
|
|
use Log::Mini;
|
|
|
|
|
|
|
|
subtest 'creates stderr logger' => sub {
|
2019-02-21 23:23:53 +03:00
|
|
|
my $logger = Log::Mini->new('stderr');
|
2019-02-21 22:30:49 +03:00
|
|
|
|
|
|
|
isa_ok $logger, 'Log::Mini::LoggerSTDERR';
|
|
|
|
};
|
|
|
|
|
|
|
|
subtest 'creates file logger' => sub {
|
2019-02-21 23:23:53 +03:00
|
|
|
my $logger = Log::Mini->new('file');
|
2019-02-21 22:30:49 +03:00
|
|
|
|
|
|
|
isa_ok $logger, 'Log::Mini::LoggerFILE';
|
|
|
|
};
|
|
|
|
|
2019-02-21 23:23:53 +03:00
|
|
|
subtest 'return STDERR on unknown logger' => sub {
|
|
|
|
my $logger = Log::Mini->new('unknown');
|
2019-02-21 22:30:49 +03:00
|
|
|
isa_ok $logger, 'Log::Mini::LoggerSTDERR';
|
|
|
|
};
|
|
|
|
|
|
|
|
done_testing;
|