1 ### Log::Message::Config test suite ###
3 if( $ENV{PERL_CORE} ) {
4 chdir '../lib/Log/Message' if -d '../lib/Log/Message';
5 unshift @INC, '../../..';
9 BEGIN { chdir 't' if -d 't' }
12 use lib qw[../lib conf];
13 use Test::More tests => 6;
15 use File::Basename qw[dirname];
17 use_ok( 'Log::Message::Config' ) or diag "Config.pm not found. Dying", die;
18 use_ok( 'Log::Message' ) or diag "Module.pm not found. Dying", die;
30 my $log = Log::Message->new();
32 is_deeply( $default, $log->{CONFIG}, q[Config creation from default] );
45 my $log = Log::Message->new( %$config );
47 is_deeply( $config, $log->{CONFIG}, q[Config creation from options] );
60 my $log = Log::Message->new(
61 config => File::Spec->catfile( qw|conf config_file| )
64 is_deeply( $file, $log->{CONFIG}, q[Config creation from file] );
77 my $log = Log::Message->new(
78 config => File::Spec->catfile( qw|conf config_file| ),
82 is_deeply( $mixed, $log->{CONFIG}, q[Config creation from file & options] );