summaryrefslogtreecommitdiff
path: root/t/lib/warnings
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgs@consttype.org>2009-11-29 23:30:45 +0100
committerRafael Garcia-Suarez <rgs@consttype.org>2009-11-29 23:30:45 +0100
commit75068674a0c83a71b3705f2c6000b34d849b9640 (patch)
treea14d9163f2dc5857f245dc257aa5a081ef561a0d /t/lib/warnings
parentdfd167e94af611f6248e804cb228b35ca4123bd6 (diff)
downloadperl-75068674a0c83a71b3705f2c6000b34d849b9640.tar.gz
Make split warn in void context
Diffstat (limited to 't/lib/warnings')
-rw-r--r--t/lib/warnings/op12
1 files changed, 12 insertions, 0 deletions
diff --git a/t/lib/warnings/op b/t/lib/warnings/op
index 73f1527fcf..4264615223 100644
--- a/t/lib/warnings/op
+++ b/t/lib/warnings/op
@@ -1057,3 +1057,15 @@ $[ = 3;
EXPECT
Use of assignment to $[ is deprecated at - line 2.
Use of assignment to $[ is deprecated at - line 4.
+########
+# op.c
+use warnings 'void';
+@x = split /y/, "z";
+$x = split /y/, "z";
+ split /y/, "z";
+no warnings 'void';
+@x = split /y/, "z";
+$x = split /y/, "z";
+ split /y/, "z";
+EXPECT
+Useless use of split in void context at - line 5.