summaryrefslogtreecommitdiff
path: root/t/op/universal.t
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>2009-02-07 15:31:49 +0100
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2009-02-07 15:32:56 +0100
commitcd477a63b79827394e51e6698e1a59ee11fa4eeb (patch)
treecfac8a70180a2ff4b718681e1c584744932be421 /t/op/universal.t
parent1d9f57de1578571277e83372972a28d6d830e713 (diff)
downloadperl-cd477a63b79827394e51e6698e1a59ee11fa4eeb.tar.gz
Add test for previous patch (deprecation of UNIVERSAL->import)
Diffstat (limited to 't/op/universal.t')
-rwxr-xr-xt/op/universal.t10
1 files changed, 9 insertions, 1 deletions
diff --git a/t/op/universal.t b/t/op/universal.t
index f1c0323c67..a1ff975c70 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");
+}