summaryrefslogtreecommitdiff
path: root/t/065Undef.t
diff options
context:
space:
mode:
Diffstat (limited to 't/065Undef.t')
-rw-r--r--t/065Undef.t28
1 files changed, 28 insertions, 0 deletions
diff --git a/t/065Undef.t b/t/065Undef.t
new file mode 100644
index 0000000..31447e5
--- /dev/null
+++ b/t/065Undef.t
@@ -0,0 +1,28 @@
+use strict;
+
+use File::Temp qw( tempfile );
+
+BEGIN {
+ if($ENV{INTERNAL_DEBUG}) {
+ require Log::Log4perl::InternalDebug;
+ Log::Log4perl::InternalDebug->enable();
+ }
+}
+
+my($tmpfh, $tempfile) = tempfile( UNLINK => 1 );
+
+use Test::More;
+BEGIN { plan tests => 1 };
+use Log::Log4perl qw( :easy );
+
+Log::Log4perl->easy_init( { level => $DEBUG, file => $tempfile } );
+
+my $warnings = "";
+
+$SIG{__WARN__} = sub {
+ $warnings .= $_[0];
+};
+
+DEBUG "foo", undef, "bar";
+
+like $warnings, qr/Log message argument #2/, "warning for undef element issued";