Test for [perl #87726] (warning from diagnostics.pm under -w)
authorFather Chrysostomos <sprout@cpan.org>
Wed, 6 Apr 2011 01:00:14 +0000 (18:00 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Mon, 18 Jul 2011 21:34:14 +0000 (14:34 -0700)
lib/diagnostics.t

index 1dc8ec3..b5db34d 100644 (file)
@@ -1,13 +1,18 @@
-#!./perl
+#!./perl -w
 
 BEGIN {
     chdir '..' if -d '../pod' && -d '../t';
     @INC = 'lib';
 }
 
-use Test::More tests => 7;
+use Test::More tests => 8;
 
-BEGIN { use_ok('diagnostics') }
+BEGIN {
+    my $w;
+    $SIG{__WARN__} = sub { $w = shift };
+    use_ok('diagnostics');
+    is $w, undef, 'no warnings when loading diagnostics.pm';
+}
 
 require base;