diff options
author | Father Chrysostomos <sprout@cpan.org> | 2014-10-20 19:29:43 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2014-10-22 19:50:28 -0700 |
commit | 72a2372ef50b55dc734118b73e7ccc334fb0589b (patch) | |
tree | 83b75abc53442a8a753a53538c90ea52d2b0a047 /t/op/repeat.t | |
parent | 8492b23f5f79134c3ff03c028a30efcaceab1291 (diff) | |
download | perl-72a2372ef50b55dc734118b73e7ccc334fb0589b.tar.gz |
repeat.t: Remove to-do test for 20010809.028
Aka #7505, the bug was that list repeat didn’t copy its
elements. But list repeat hasn’t copied its elements for
years now, and code could be relying on the current
behaviour of foreach(($var)x2) { ... } which aliases $_
to $var twice. We also have tests for the current
behaviour.
Diffstat (limited to 't/op/repeat.t')
-rw-r--r-- | t/op/repeat.t | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/t/op/repeat.t b/t/op/repeat.t index bfd142f2b3..aa15f2483f 100644 --- a/t/op/repeat.t +++ b/t/op/repeat.t @@ -6,7 +6,7 @@ BEGIN { } require './test.pl'; -plan(tests => 43); +plan(tests => 42); # compile time @@ -141,17 +141,6 @@ is(77, scalar ((1,7)x2), 'stack truncation'); is( join('', @$x), 'foofoo', 'list repeat in anon array ref broken [ID 20011113.110]' ); } -# [ID 20010809.028] x operator not copying elements in 'for' list? -{ - local $TODO = "x operator not copying elements in 'for' list? [ID 20010809.028]"; - my $x = 'abcd'; - my $y = ''; - for (($x =~ /./g) x 2) { - $y .= chop; - } - is($y, 'abcdabcd'); -} - # [perl #35885] is( (join ',', (qw(a b c) x 3)), 'a,b,c,a,b,c,a,b,c', 'x on qw produces list' ); |