summaryrefslogtreecommitdiff
path: root/t/lib/warnings/op
diff options
context:
space:
mode:
Diffstat (limited to 't/lib/warnings/op')
-rw-r--r--t/lib/warnings/op11
1 files changed, 11 insertions, 0 deletions
diff --git a/t/lib/warnings/op b/t/lib/warnings/op
index ab6d773c1f..2fa54b8262 100644
--- a/t/lib/warnings/op
+++ b/t/lib/warnings/op
@@ -36,6 +36,9 @@
$a ;
"abc"
+ Useless use of sort in scalar context
+ my $x = sort (2,1,3);
+
Applying %s to %s will act on scalar(%s)
my $a ; my @a = () ; my %a = () ; my $b = \@a ; my $c = \%a ;
@a =~ /abc/ ;
@@ -332,6 +335,14 @@ Useless use of getpwnam in void context at - line 52.
Useless use of getpwuid in void context at - line 53.
########
# op.c
+use warnings 'void' ; close STDIN ;
+my $x = sort (2,1,3);
+no warnings 'void' ;
+$x = sort (2,1,3);
+EXPECT
+Useless use of sort in scalar context at - line 3.
+########
+# op.c
no warnings 'void' ; close STDIN ;
1 x 3 ; # OP_REPEAT
# OP_GVSV