Branch Coverage

blib/lib/Lingua/JA/Jtruncate.pm
Criterion Covered Total %
branch 13 18 72.2


line true false branch
170 0 25 if $length == 0
171 0 25 unless defined $length
172 0 25 if $length < 0
173 0 25 if length $text <= $length
180 7 18 unless (defined $encoding and $encoding =~ /^(?:euc|s?jis)$/)
189 3 15 unless defined $text
198 6 9 if ($encoding eq 'jis' and $text =~ /$Lingua::JA::Jtruncate::jis_code_set{'TWO_BYTE_CHAR'}$/)
201 0 6 unless defined $text
215 3 1096 unless $text =~ s/$Lingua::JA::Jtruncate::char_re{$encoding}$//o