Branch Coverage

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


line true false branch
172 0 25 if $length == 0
173 0 25 unless defined $length
174 0 25 if $length < 0
175 0 25 if length $text <= $length
182 7 18 unless (defined $encoding and $encoding =~ /^(?:euc|s?jis)$/)
191 3 15 unless defined $text
200 6 9 if ($encoding eq 'jis' and $text =~ /$Lingua::JA::Jtruncate::jis_code_set{'TWO_BYTE_CHAR'}$/)
203 0 6 unless defined $text
217 3 1096 unless $text =~ s/$Lingua::JA::Jtruncate::char_re{$encoding}$//o