Branch Coverage

blib/lib/XML/Easy/Text.pm
Criterion Covered Total %
branch 121 126 96.0


line true false branch
107 3 0 if (eval { do { local $SIG{'__DIE__'}; require Internals; exists &Internals::SetReadOnly } }) { }
164 122 160236 if ($$rtext =~ /\G&#x([0-9A-Fa-f]+);/cg) { }
128 160108 elsif ($$rtext =~ /\G&#([0-9]+);/cg) { }
160104 4 elsif ($$rtext =~ /\G&($XML::Easy::Text::xml10_name_rx);/cog) { }
166 6 116 unless $v =~ /\A0*(.{1,6})\z/s
170 48 68 unless $c =~ /\A$XML::Easy::Text::xml10_char_rx\z/o
175 2 126 unless $v =~ /\A0*(.{1,7})\z/s
179 50 76 unless $c =~ /\A$XML::Easy::Text::xml10_char_rx\z/o
184 16 160088 unless defined $c
192 0 270 unless $$rtext =~ /\G(["'])/cg
196 192 240558 if ($$rtext =~ /\G$q/cg) { }
160016 80542 elsif ($$rtext =~ /\G(?:\x{d}\x{a}?|[\x{9}\x{a}])/cg) { }
378 80164 elsif ($$rtext =~ /\G(["'] |(?:(?![<&"'\x{9}\x{a}\x{d}]) $XML::Easy::Text::xml10_char_rx)+)/cgox) { }
80150 14 elsif ($$rtext =~ /\G(?=&)/cg) { }
227 320620 560860 if ($$rtext =~ /\G((?:(?![<&])$XML::Easy::Text::xml10_char_rx)+)/cog) { }
160054 400806 elsif ($$rtext =~ m[\G(?=<[^/?!])]cg) { }
80208 320598 elsif ($$rtext =~ /\G(?=&)/cg) { }
38 320560 elsif ($$rtext =~ /\G/cog) { }
160070 160490 elsif ($$rtext =~ /\G(?:$XML::Easy::Text::xml10_pi_rx|$XML::Easy::Text::xml10_comment_rx)/cog) { }
233 52 320568 if $value =~ s/(?!\A)(\x{d}|\]\]?)\z//
235 16 320604 if $value =~ /\]\]>/
262 66 160948 unless $$rtext =~ /\G<($XML::Easy::Text::xml10_name_rx)/cog
266 18 276 unless $$rtext =~ /\G($XML::Easy::Text::xml10_name_rx)$XML::Easy::Text::xml10_eq_rx/cog
267 6 270 if exists $attrs{$1}
270 22 160842 unless $$rtext =~ m[\G(/)?>]cg
272 320 160522 if (defined $1) { }
276 24 160414 unless $$rtext =~ m[\G]cg
278 12 160402 unless $1 eq $ename
300 13 25 unless rand $_[0]
303 4 21 unless $text =~ /\G\z/cg
319 13 1 unless rand $_[0]
322 0 1 unless $text =~ /\G\z/cg
347 13 44 unless rand $_[0]
350 8 16 unless $text =~ /\G\z/cg
372 13 916 unless rand $_[0]
374 0 916 unless $text =~ /\A$XML::Easy::Text::xml10_prolog_xdtd_rx/cog
376 6 644 unless $text =~ /\G$XML::Easy::Text::xml10_miscseq_rx\z/cog
396 13 25 unless rand $_[0]
400 2 23 unless $text =~ /\G\z/cg
416 13 1 unless rand $_[0]
420 0 1 unless $text =~ /\G\z/cg
451 156 321912 unless rand $str
465 241010 81506 if ($str =~ /\G((?:(?![\x{d}<&]|(?<=\]\])>)$XML::Easy::Text::xml10_char_rx)+) /cgx) { }
80066 1440 elsif ($str =~ /\G([\x{d}<&>])/cg) { }
486 45 162070 unless rand $twine
488 24 162046 unless @$twine % 2 == 1
500 42 973 unless rand $content
506 908 1015 if (rand $_[1]) { }
515 156 1572 unless rand $str
529 688 81454 if ($str =~ /\G((?:(?![\x{9}\x{a}\x{d}"<&])$XML::Easy::Text::xml10_char_rx)+) /cgx) { }
80014 1440 elsif ($str =~ /\G([\x{9}\x{a}\x{d}"<&])/cg) { }
548 240 167817 unless rand $elem
551 117 167700 unless rand $type_name
555 1998 165702 unless $type_name =~ /\A$XML::Easy::Text::xml10_name_rx\z/o
560 96 165606 unless rand $attributes
565 3618 1728 unless /\A$XML::Easy::Text::xml10_name_rx\z/o
573 110 160234 if (rand $twine and @$twine == 1 and rand $$twine[0] and $$twine[0] eq '') { }
629 3025 2509 if (defined $encname)
630 24 3001 unless rand $encname
634 492 2509 unless $encname =~ /\A$XML::Easy::Text::xml10_encname_rx\z/
661 1151 637 if (defined $encname)
662 24 1127 unless rand $encname
666 492 635 unless $encname =~ /\A$XML::Easy::Text::xml10_encname_rx\z/