summaryrefslogtreecommitdiff
path: root/t/op/repeat.t
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2001-11-18 17:07:12 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2001-11-18 17:07:12 +0000
commit976c8a39d49b217cde66f5408b0c0e7431507598 (patch)
tree993053f7ca20e8a70fb9e0975f8ea7ec53357b5a /t/op/repeat.t
parentf36eea1037c5e636f0a49c0b179f8f7dce70d331 (diff)
downloadperl-976c8a39d49b217cde66f5408b0c0e7431507598.tar.gz
Retract 11635: close 20011113.110, reopen 20010809.028.
Tiny problem in the test for 20011113.110: I hope 'my $x= [("foo") x 1]' was never going to produce [qw(foo foo)] :-) p4raw-id: //depot/perl@13077
Diffstat (limited to 't/op/repeat.t')
-rwxr-xr-xt/op/repeat.t19
1 files changed, 15 insertions, 4 deletions
diff --git a/t/op/repeat.t b/t/op/repeat.t
index ef462cb76e..82fcf75bd2 100755
--- a/t/op/repeat.t
+++ b/t/op/repeat.t
@@ -6,7 +6,7 @@ BEGIN {
}
require './test.pl';
-plan(tests => 24);
+plan(tests => 25);
# compile time
@@ -118,7 +118,18 @@ is(77, scalar ((1,7)x2), 'stack truncation');
# perlbug 20011113.110 works in 5.6.1, broken in 5.7.2
{
- local $TODO = 'list repeat in anon array ref broken [ID 20011113.110]';
- my $x= [("foo") x 1];
- is( join('', @$x), 'foofoo' );
+ my $x= [("foo") x 2];
+ 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');
+}
+