X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fop%2Fsplit.t;h=17ab1e6a37546e2e475ab3f35e330c24b3c00f9b;hb=7f18b612425de6038ac70eda799f641227e16a64;hp=55b2839b0cafc87f538829cc95c5d81c2b585e6b;hpb=e1c3fb40dd782fd9b634587360c23d899b86794d;p=p5sagit%2Fp5-mst-13.2.git diff --git a/t/op/split.t b/t/op/split.t index 55b2839..17ab1e6 100755 --- a/t/op/split.t +++ b/t/op/split.t @@ -6,7 +6,7 @@ BEGIN { require './test.pl'; } -plan tests => 52; +plan tests => 54; $FS = ':'; @@ -279,6 +279,13 @@ ok(@ary == 3 && { $p="a,b"; utf8::upgrade $p; - @a=split(/[, ]+/,$p); + eval { @a=split(/[, ]+/,$p) }; is ("$@-@a-", '-a b-', '#20912 - split() to array with /[]+/ and utf8'); } + +{ + is (\@a, \@{"a"}, '@a must be global for following test'); + $p=""; + $n = @a = split /,/,$p; + is ($n, 0, '#21765 - pmreplroot hack used to return undef for 0 iters'); +}