Branch Coverage

blib/lib/AozoraBunko/Tools/Checkerkun.pm
Criterion Covered Total %
branch 95 114 83.3


line true false branch
68 58 6 ref $_[0] eq 'HASH' ? :
74 2 750 if (not exists $options->{$key}) { }
77 58 692 if ($key eq 'output_format')
79 1 57 unless exists $VALID_OUTPUT_FORMAT{$args{$key}}
93 8 4034 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 16 48 if ($self->{'simplesp'} and $char eq ' ' || $char eq "\x{3000}")
181 8 8 if ($output_format eq 'plaintext') { }
8 0 elsif ($output_format eq 'html') { }
183 4 4 if ($char eq ' ') { }
4 0 elsif ($char eq "\x{3000}") { }
188 4 4 if ($char eq ' ') { }
4 0 elsif ($char eq "\x{3000}") { }
195 4 8600 if ($char =~ /[\x{0000}-\x{0009}\x{000B}\x{000C}\x{000E}-\x{001F}\x{007F}-\x{009F}]/) { }
4 8596 elsif ($char =~ /\p{InHalfwidthKatakana}/) { }
4 8592 elsif ($self->{'hansp'} and $char eq ' ') { }
4 8588 elsif ($self->{'zensp'} and $char eq "\x{3000}") { }
8 8580 elsif ($self->{'hanpar'} and $char eq '(' || $char eq ')') { }
4008 4572 elsif ($char eq "\x{203b}" and $self->{'78hosetsu_tekiyo'} || $self->{'hosetsu_tekiyo'}) { }
199 2 2 if ($output_format eq 'plaintext') { }
2 0 elsif ($output_format eq 'html') { }
210 2 2 if ($output_format eq 'plaintext') { }
2 0 elsif ($output_format eq 'html') { }
221 2 2 if ($output_format eq 'plaintext') { }
2 0 elsif ($output_format eq 'html') { }
232 2 2 if ($output_format eq 'plaintext') { }
2 0 elsif ($output_format eq 'html') { }
243 4 4 if ($output_format eq 'plaintext') { }
4 0 elsif ($output_format eq 'html') { }
256 4008 0 if ($replace)
265 4 4568 if ($self->{'78'} and $AozoraBunko::Tools::Checkerkun::J78->{$char}) { }
4 4564 elsif ($self->{'jyogai'} and $AozoraBunko::Tools::Checkerkun::JYOGAI->{$char}) { }
8 4556 elsif ($self->{'gonin1'} and $AozoraBunko::Tools::Checkerkun::GONIN1->{$char}) { }
8 4548 elsif ($self->{'gonin2'} and $AozoraBunko::Tools::Checkerkun::GONIN2->{$char}) { }
8 4540 elsif ($self->{'gonin3'} and $AozoraBunko::Tools::Checkerkun::GONIN3->{$char}) { }
4004 536 elsif ($self->{'gaiji'} and _is_gaiji($char)) { }
267 2 2 if ($output_format eq 'plaintext') { }
2 0 elsif ($output_format eq 'html') { }
278 2 2 if ($output_format eq 'plaintext') { }
2 0 elsif ($output_format eq 'html') { }
289 4 4 if ($output_format eq 'plaintext') { }
4 0 elsif ($output_format eq 'html') { }
300 4 4 if ($output_format eq 'plaintext') { }
4 0 elsif ($output_format eq 'html') { }
311 4 4 if ($output_format eq 'plaintext') { }
4 0 elsif ($output_format eq 'html') { }
322 2002 2002 if ($output_format eq 'plaintext') { }
2002 0 elsif ($output_format eq 'html') { }