summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorRobin Houston <robin@cpan.org>2001-04-02 16:03:29 +0100
committerJarkko Hietaniemi <jhi@iki.fi>2001-04-03 13:11:46 +0000
commit936edb8bce14c9708bc6198559047de5d7e6af47 (patch)
tree56418e45ab38e385bc4cd7ab1edf78f3c4007654 /t
parent31f187ae5b4b937f1c4319a89e6fd6f99121320a (diff)
downloadperl-936edb8bce14c9708bc6198559047de5d7e6af47.tar.gz
Re: [ID 20010331.003] new misc warning for push(@x), unshift(@x)
Message-ID: <20010402150329.A6636@puffinry.freeserve.co.uk> p4raw-id: //depot/perl@9532
Diffstat (limited to 't')
-rwxr-xr-xt/lib/db-recno.t2
-rw-r--r--t/pragma/warn/op12
2 files changed, 13 insertions, 1 deletions
diff --git a/t/lib/db-recno.t b/t/lib/db-recno.t
index 8b5a88cc6d..4ca547f1e7 100755
--- a/t/lib/db-recno.t
+++ b/t/lib/db-recno.t
@@ -202,7 +202,7 @@ ok(30, $value eq $shifted );
# UNSHIFT
# empty list
-($FA ? unshift @h : $X->unshift) ;
+($FA ? unshift @h,() : $X->unshift) ;
ok(31, ($FA ? @h == @data : $X->length == @data ));
my @new_data = qw(add this to the start of the array) ;
diff --git a/t/pragma/warn/op b/t/pragma/warn/op
index f3c0548e57..ab2124ea77 100644
--- a/t/pragma/warn/op
+++ b/t/pragma/warn/op
@@ -884,3 +884,15 @@ in begin
in mainline
in end
in end
+########
+# op.c
+my @x;
+use warnings 'misc' ;
+push(@x);
+unshift(@x);
+no warnings 'misc' ;
+push(@x);
+unshift(@x);
+EXPECT
+Useless use of push with no arguments at - line 4.
+Useless use of unshift with no arguments at - line 5.