summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2011-04-05 18:00:14 -0700
committerFather Chrysostomos <sprout@cpan.org>2011-07-18 14:34:14 -0700
commit00680da2f2a66e2338d9c1b1efd49d04598fb77d (patch)
tree58003be5b6053bd51aa5bf9d25d3f0d2150f8771
parent77ccfaeb2504f1318efe013cdc637b9886ea49f7 (diff)
downloadperl-00680da2f2a66e2338d9c1b1efd49d04598fb77d.tar.gz
Test for [perl #87726] (warning from diagnostics.pm under -w)
-rw-r--r--lib/diagnostics.t11
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/diagnostics.t b/lib/diagnostics.t
index 1dc8ec3a57..b5db34de74 100644
--- a/lib/diagnostics.t
+++ b/lib/diagnostics.t
@@ -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;