diff options
author | Rafael Garcia-Suarez <rgs@consttype.org> | 2010-03-31 11:32:16 +0200 |
---|---|---|
committer | Rafael Garcia-Suarez <rgs@consttype.org> | 2010-03-31 11:32:16 +0200 |
commit | 54113d22852e6f8b1560cbca15e39b1f22a9ad67 (patch) | |
tree | 2ebffa29bc1b6c3688c71c771947111612e9fd83 | |
parent | 572558b47236782e60e41bd235c96eae7cbca3db (diff) | |
download | perl-54113d22852e6f8b1560cbca15e39b1f22a9ad67.tar.gz |
Add a test for reversing in-place an empty array
-rw-r--r-- | t/op/reverse.t | 6 |
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; |