From: Rafael Garcia-Suarez Date: Sat, 7 Feb 2009 14:31:49 +0000 (+0100) Subject: Add test for previous patch (deprecation of UNIVERSAL->import) X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=cd477a63b79827394e51e6698e1a59ee11fa4eeb;p=p5sagit%2Fp5-mst-13.2.git Add test for previous patch (deprecation of UNIVERSAL->import) --- diff --git a/t/op/universal.t b/t/op/universal.t index f1c0323..a1ff975 100755 --- a/t/op/universal.t +++ b/t/op/universal.t @@ -10,7 +10,7 @@ BEGIN { require "./test.pl"; } -plan tests => 116; +plan tests => 117; $a = {}; bless $a, "Bob"; @@ -245,3 +245,11 @@ ok (!splatt->isa('plop')); ok (!splatt->isa('zlopp')); ok (splatt->isa('plop')); +use warnings "deprecated"; +{ + my $m; + local $SIG{__WARN__} = sub { $m = $_[0] }; + eval "use UNIVERSAL"; + like($m, qr/^UNIVERSAL->import is deprecated/, + "deprecation warning for UNIVERSAL->import"); +}