X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fop%2Fsubstr.t;h=08f416553a2ac24970f605c15bd0729c770c8439;hb=a67d7df96497dfc3914166c6fa65662e524a5bbb;hp=681ac6d7a6740cfef95aad27afd35752d554b5e8;hpb=25a9bd2a66ab90bebdf152f1b70a957b5876ed63;p=p5sagit%2Fp5-mst-13.2.git diff --git a/t/op/substr.t b/t/op/substr.t index 681ac6d..08f4165 100755 --- a/t/op/substr.t +++ b/t/op/substr.t @@ -1,6 +1,6 @@ #!./perl -print "1..188\n"; +print "1..189\n"; #P = start of string Q = start of substr R = end of substr S = end of string @@ -640,3 +640,14 @@ ok 174, $x eq "\x{100}\x{200}\xFFb"; $foo = '123456789'; ok 188, bar eq '123456789'; } + +# [perl #29149] +{ + my $text = "0123456789\xED "; + utf8::upgrade($text); + my $pos = 5; + pos($text) = $pos; + my $a = substr($text, $pos, $pos); + ok 189, substr($text,$pos,1) eq $pos; + +}