X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fop%2Fsubstr.t;h=17f86e3e630a45bd7288044402a901f1ef115ce3;hb=24aef97f7fec4668a5731fc6d5179ebebd43f183;hp=85574d56ec9f4942f4a7faab50f305d184fb12de;hpb=9402d6ed2c283eecb57dee09174d6f259c11dbef;p=p5sagit%2Fp5-mst-13.2.git diff --git a/t/op/substr.t b/t/op/substr.t index 85574d5..17f86e3 100755 --- a/t/op/substr.t +++ b/t/op/substr.t @@ -1,6 +1,6 @@ #!./perl -print "1..174\n"; +print "1..175\n"; #P = start of string Q = start of substr R = end of substr S = end of string @@ -585,3 +585,10 @@ ok 173, $x eq "\xFFb\x{100}\x{200}"; substr($x = "\x{100}\x{200}", 2, 0, "\xFFb"); ok 174, $x eq "\x{100}\x{200}\xFFb"; +# [perl #20933] +{ + my $s = "ab"; + my @r; + $r[$_] = \ substr $s, $_, 1 for (0, 1); + ok 175, join("", map { $$_ } @r) eq "ab"; +}