Branch Coverage

blib/lib/AozoraBunko/Tools/Checkerkun.pm
Criterion Covered Total %
branch 90 106 84.9


line true false branch
68 58 6 ref $_[0] eq 'HASH' ? :
74 2 751 if (not exists $options->{$key}) { }
77 58 693 if ($key eq 'output_format')
79 1 57 unless exists $VALID_OUTPUT_FORMAT{$args{$key}}
93 2014 2020 unless defined $msg
116 14 3994 if $rear_index > $#{$chars_ref;}
118 4008 0 if (join('', @{$chars_ref;}[$index .. $rear_index]) =~ /^(\x{203b}\x{ff3b}\x{ff03}.*?\x{6c34}\x{6e96}(\d+\-\d+\-\d+).*?\x{ff3d})/)
122 2004 2004 if ($self->{'78hosetsu_tekiyo'} and exists $AozoraBunko::Tools::Checkerkun::KUTENMEN_78HOSETSU_TEKIYO->{$kutenmen}) { }
2004 0 elsif ($self->{'hosetsu_tekiyo'} and exists $AozoraBunko::Tools::Checkerkun::KUTENMEN_HOSETSU_TEKIYO->{$kutenmen}) { }
124 1002 1002 if ($self->{'output_format'} eq 'plaintext') { }
1002 0 elsif ($self->{'output_format'} eq 'html') { }
137 1002 1002 if ($self->{'output_format'} eq 'plaintext') { }
1002 0 elsif ($self->{'output_format'} eq 'html') { }
159 4004 12 if $@
167 1 56 unless defined $text
179 64 8572 if ($self->{'simplesp'})
181 8 56 if $char eq ' '
182 8 56 if $char eq "\x{3000}"
185 4 8632 if ($char =~ /[\x{0000}-\x{0009}\x{000B}\x{000C}\x{000E}-\x{001F}\x{007F}-\x{009F}]/) { }
4 8628 elsif ($char =~ /\p{InHalfwidthKatakana}/) { }
4 8624 elsif ($self->{'hansp'} and $char =~ / /) { }
4 8620 elsif ($self->{'zensp'} and $char eq "\x{3000}") { }
8 8612 elsif ($self->{'hanpar'} and $char eq '(' || $char eq ')') { }
4008 4604 elsif ($char eq "\x{203b}" and $self->{'78hosetsu_tekiyo'} || $self->{'hosetsu_tekiyo'}) { }
189 2 2 if ($output_format eq 'plaintext') { }
2 0 elsif ($output_format eq 'html') { }
200 2 2 if ($output_format eq 'plaintext') { }
2 0 elsif ($output_format eq 'html') { }
211 2 2 if ($output_format eq 'plaintext') { }
2 0 elsif ($output_format eq 'html') { }
222 2 2 if ($output_format eq 'plaintext') { }
2 0 elsif ($output_format eq 'html') { }
233 4 4 if ($output_format eq 'plaintext') { }
4 0 elsif ($output_format eq 'html') { }
246 4008 0 if ($replace)
255 4 4600 if ($self->{'78'} and $AozoraBunko::Tools::Checkerkun::J78->{$char}) { }
4 4596 elsif ($self->{'jyogai'} and $AozoraBunko::Tools::Checkerkun::JYOGAI->{$char}) { }
8 4588 elsif ($self->{'gonin1'} and $AozoraBunko::Tools::Checkerkun::GONIN1->{$char}) { }
8 4580 elsif ($self->{'gonin2'} and $AozoraBunko::Tools::Checkerkun::GONIN2->{$char}) { }
8 4572 elsif ($self->{'gonin3'} and $AozoraBunko::Tools::Checkerkun::GONIN3->{$char}) { }
4004 568 elsif ($self->{'gaiji'} and _is_gaiji($char)) { }
257 2 2 if ($output_format eq 'plaintext') { }
2 0 elsif ($output_format eq 'html') { }
268 2 2 if ($output_format eq 'plaintext') { }
2 0 elsif ($output_format eq 'html') { }
279 4 4 if ($output_format eq 'plaintext') { }
4 0 elsif ($output_format eq 'html') { }
290 4 4 if ($output_format eq 'plaintext') { }
4 0 elsif ($output_format eq 'html') { }
301 4 4 if ($output_format eq 'plaintext') { }
4 0 elsif ($output_format eq 'html') { }
312 2002 2002 if ($output_format eq 'plaintext') { }
2002 0 elsif ($output_format eq 'html') { }