|
#!perl -T
use 5.006;
close *STDERR ;
my $STDERR = q{} ;
open *STDERR , '>' , \ $STDERR ;
my $CONFIG = 'complex' ;
my $expected = qr{
\[\d+\] \s /.*/lib/Smart/Comments/Log4perl.pm \s \d+ \s main \s \- \s+
\[\d+\] \s /.*/lib/Smart/Comments/Log4perl.pm \s \d+ \s main \s \- \s \#\#\# \s Testing \s 1\.\.\. \s+
\[\d+\] \s /.*/lib/Smart/Comments/Log4perl.pm \s \d+ \s main \s \- \s+
\[\d+\] \s /.*/lib/Smart/Comments/Log4perl.pm \s \d+ \s main \s \- \s \#\#\# \s Testing \s 2\.\.\. \s+
\[\d+\] \s /.*/lib/Smart/Comments/Log4perl.pm \s \d+ \s main \s \- \s+
\[\d+\] \s /.*/lib/Smart/Comments/Log4perl.pm \s \d+ \s main \s \- \s \#\#\# \s Testing \s 3\.\.\. \s+
} msx;
like $STDERR , $expected => 'Custom configured logging messages work' ;
|