Branch Coverage

blib/lib/Aozora2Epub/XHTML.pm
Criterion Covered Total %
branch 79 98 80.6


line true false branch
23 2 7 $men == 2 ? :
33 1 8 if $men == 1 and $ku == 6 and $ten == 88
36 1 7 if $men == 1 and $ku == 90 and $ten == 61
37 1 2 if $men == 2 and $ku == 15 and $ten == 73
61 5 10 if $kindle_broken_font_unicode{$unicode}
64 2 8 if $unicode > 65535 and not $kindle_ok_font_over0xffff{$unicode}
71 2 5 if ($unicode)
73 1 1 if $ch
77 5 0 if $ch
83 120 8 unless $s
88 6 1 $ch ? :
113 14 11 if ($anchor)
118 0 25 unless $h->attr("id")
122 10 15 if ($parent and $parent->isa("HTML::Element") and $parent->tag("div") and $parent->attr("class") and $parent->attr("class") =~ /jisage_\d+/)
128 0 10 if $h->attr("style")
138 4 1 if ($src =~ m[/(gaiji/\d-\d+/(\d)-(\d\d)-(\d\d)\.png)$])
140 1 3 if ($ch)
151 0 1 unless $br and $br->isa("HTML::Element") and $br->tag eq "br"
153 0 1 unless $caption
154 0 1 unless $caption->isa("HTML::Element")
155 0 1 unless $caption->tag eq "span" and $caption->attr("class") =~ /caption/
165 32 48 unless ($elem->isa("HTML::Element"))
174 0 3 unless @c
177 7 10 if ($c->isa("HTML::Element"))
226 4 1 if $orig_src
249 4 16 unless $note =~ /\x{ff3b}\x{ff03}[^\\x{ff3d}]+?\x{3001}([^\\x{ff3d}]+)\x{ff3d}/
252 13 3 if ($desc =~ /U\+([A-fa-f0-9]+)/) { }
3 0 elsif ($desc =~ /\x{7b2c}\d\x{6c34}\x{6e96}(\d)-(\d+)-(\d+)/) { }
258 6 10 unless $ch
262 5 5 unless ($left->isa("HTML::Element"))
263 4 1 if ($left =~ s/\x{203b}$/$ch/)
268 5 0 if ($left->tag eq "ruby")
271 4 1 if ($s =~ s/\x{203b}/$ch/)
285 3 1 if ($path =~ m[gaiji/(.+\.png)$]) { }
327 35 55 unless ($c->isa("HTML::Element"))
331 1 54 if (_is_pagebreak($c))
332 1 0 if @cur
336 12 42 if ($c->tag =~ /h[123]/)
343 6 1 unless _is_center_chuuki($last_elem)
347 6 6 if $last_elem
348 6 6 if @cur
352 7 11 unless ($c1->isa("HTML::Element"))
357 1 10 if (_is_pagebreak($c1))
358 1 0 if @newcur
363 2 8 unless (_is_empty($c1) or $c1->tag =~ /h[123]/)
377 37 0 if @cur
384 0 0 if (ref $e eq "ARRAY")
393 0 0 if ($e->isa('HTML::Element')) { }
398 0 0 $no_nl ? :