From 00680da2f2a66e2338d9c1b1efd49d04598fb77d Mon Sep 17 00:00:00 2001 From: Father Chrysostomos Date: Tue, 5 Apr 2011 18:00:14 -0700 Subject: [PATCH] Test for [perl #87726] (warning from diagnostics.pm under -w) --- lib/diagnostics.t | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/lib/diagnostics.t b/lib/diagnostics.t index 1dc8ec3..b5db34d 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; -- 2.7.4