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