From: Rafael Garcia-Suarez Date: Wed, 31 Mar 2010 09:32:16 +0000 (+0200) Subject: Add a test for reversing in-place an empty array X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=54113d22852e6f8b1560cbca15e39b1f22a9ad67;p=p5sagit%2Fp5-mst-13.2.git Add a test for reversing in-place an empty array --- diff --git a/t/op/reverse.t b/t/op/reverse.t index 1ad727a..9cd3ee1 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;