diff options
author | Father Chrysostomos <sprout@cpan.org> | 2011-04-05 18:00:14 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2011-07-18 14:34:14 -0700 |
commit | 00680da2f2a66e2338d9c1b1efd49d04598fb77d (patch) | |
tree | 58003be5b6053bd51aa5bf9d25d3f0d2150f8771 /lib/diagnostics.t | |
parent | 77ccfaeb2504f1318efe013cdc637b9886ea49f7 (diff) | |
download | perl-00680da2f2a66e2338d9c1b1efd49d04598fb77d.tar.gz |
Test for [perl #87726] (warning from diagnostics.pm under -w)
Diffstat (limited to 'lib/diagnostics.t')
-rw-r--r-- | lib/diagnostics.t | 11 |
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; |