summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgs@consttype.org>2010-03-31 11:32:16 +0200
committerRafael Garcia-Suarez <rgs@consttype.org>2010-03-31 11:32:16 +0200
commit54113d22852e6f8b1560cbca15e39b1f22a9ad67 (patch)
tree2ebffa29bc1b6c3688c71c771947111612e9fd83
parent572558b47236782e60e41bd235c96eae7cbca3db (diff)
downloadperl-54113d22852e6f8b1560cbca15e39b1f22a9ad67.tar.gz
Add a test for reversing in-place an empty array
-rw-r--r--t/op/reverse.t6
1 files changed, 5 insertions, 1 deletions
diff --git a/t/op/reverse.t b/t/op/reverse.t
index 1ad727ace9..9cd3ee125b 100644
--- a/t/op/reverse.t
+++ b/t/op/reverse.t
@@ -6,7 +6,7 @@ BEGIN {
require './test.pl';
}
-plan tests => 21;
+plan tests => 22;
is(reverse("abc"), "cba");
@@ -44,6 +44,10 @@ is(reverse(), "raboof");
@a = reverse @a;
ok(!exists $a[2] && !exists $a[3]);
is($a[0] . $a[1] . $a[4], '985');
+
+ my @empty;
+ @empty = reverse @empty;
+ is("@empty", "");
}
use Tie::Array;