X-Git-Url: https://perl5.git.perl.org/perl5.git/blobdiff_plain/6b776407d46448d59a69054c8cd4cec4d91f50c0..d720149d59afad1fa0ae15d5f092fdc47bd1a4f7:/t/op/split.t diff --git a/t/op/split.t b/t/op/split.t index ceaea00..81c908e 100644 --- a/t/op/split.t +++ b/t/op/split.t @@ -7,7 +7,7 @@ BEGIN { set_up_inc('../lib'); } -plan tests => 161; +plan tests => 162; $FS = ':'; @@ -621,3 +621,11 @@ is "@a", '1 2 3', 'assignment to split-to-array (stacked)'; ok eval { $a[0] = 'a'; 1; }, "array split filling AvARRAY: assign 0"; is "@a", "a b", "array split filling AvARRAY: result"; } + +# splitting an empty utf8 string gave an assert failure +{ + my $s = "\x{100}"; + chop $s; + my @a = split ' ', $s; + is (+@a, 0, "empty utf8 string"); +}