Condition Coverage

blib/lib/MIME/EncWords.pm
Criterion Covered Total %
condition 110 177 62.1


and 2 conditions

line l !l condition
1023 99 0 not $charset->decoder and 'Encode'
1034 0 46 not &is_utf8($ustr) || $ustr =~ /$WIDECHAR/ and 'Encode'

and 3 conditions

line !l l&&!r l&&r condition
195 0 0 57 length($str) % 4 == 0 and $str =~ m[^[A-Za-z0-9+/]+={0,2}$]
388 25 57 24 scalar @tokens and lc($charset || '') eq lc($tokens[-1][1] || '')
82 0 24 scalar @tokens and lc($charset || '') eq lc($tokens[-1][1] || '') and &resolve_alias($charset)
57 24 0 scalar @tokens and lc($charset || '') eq lc($tokens[-1][1] || '') and &resolve_alias($charset) and !($tokens[-1][2] || $language) || lc $tokens[-1][2] eq lc $language
441 0 87 0 $charset and $charset ne &MIME::Charset::default()
477 29 37 0 $charset->as_string and $charset->as_string eq $cset->as_string
828 45 100 66 $csetobj->as_string and $csetobj->as_string =~ /$ASCIIINCOMPAT/
849 101 110 0 defined $enc and $Params{'Encoding'} eq 'S' || $Params{'Encoding'} eq 'A' && $obj->header_encoding eq 'S'
855 110 0 101 $cset eq 'US-ASCII' and not $enc
110 97 4 $cset eq 'US-ASCII' and not $enc and $s =~ /$UNSAFEASCII/
880 0 95 26 $csetobj->decoder and ($lastcsetobj->as_string || '') eq $csetobj->as_string
95 0 26 $csetobj->decoder and ($lastcsetobj->as_string || '') eq $csetobj->as_string and ($lastenc || '') eq ($enc || '')
65 0 30 not $lastenc and $enc
65 23 7 not $lastenc and $enc and not $last =~ /[\r\n\t ]$/
23 1 64 $lastenc and not $enc
24 48 16 $lastenc and not $enc and not $s =~ /^[\r\n\t ]/
915 0 35 7 $Params{'Encoding'} eq 'A' and $b
35 0 7 $Params{'Encoding'} eq 'A' and $b and not $q
0 0 35 $Params{'Encoding'} eq 'A' and not $b
0 35 0 $Params{'Encoding'} eq 'A' and not $b and $q
934 35 7 42 $$_[1] and $$_[1] eq 'S'
939 0 90 0 scalar @triplets and $triplets[0][0] =~ s/^[\r\n\t ]+//
1020 99 0 86 not $encoding and $charset->as_string eq 'US-ASCII'
1040 0 41 5 $first and not $str
41 1 4 $first and not $str and $maxrestlen < $charset->encoded_header_len($first, $encoding)
1200 66 0 528 $GotParams{$i} &&= uc $GotParams{$i}

or 2 conditions

line l !l condition
369 4 0 $2 || undef
370 4 0 $charset ||= undef
388 81 0 $charset || ''
39 42 $tokens[-1][1] || ''
538 144 0 shift() || 'Q'
539 144 0 shift() || 'ISO-8859-1'
540 0 144 shift() || ''
725 0 90 $2 || ' '
824 166 45 $cset || ''
863 2 0 $csetobj->header_encoding || 'Q'
880 121 0 $lastcsetobj->as_string || ''
15 11 $lastenc || ''
15 11 $enc || ''
1172 630 180 $params{$k} || []

or 3 conditions

line l !l&&r !l&&!r condition
174 0 0 0 $cset eq 'UTF-16' or $cset eq 'UTF-16BE'
0 0 0 $cset eq 'UTF-32' or $cset eq 'UTF-32BE'
388 24 0 0 !($tokens[-1][2] || $language) || lc $tokens[-1][2] eq lc $language
439 36 46 87 $$t[0] =~ /$UNSAFE/ or $$t[1]
472 29 37 0 $cset->decoder or $cset->as_string eq '_UNICODE_'
484 0 0 66 &is_utf8($s) or $s =~ /$WIDECHAR/
543 0 0 144 &is_utf8($word) or $word =~ /$WIDECHAR/
767 574 66 0 scalar @words or length $w
777 0 0 6 &is_utf8($w) or $w =~ /$WIDECHAR/
787 59 1 227 $w =~ /$NONPRINT|$UNSAFEASCII/ or $u ne $w
801 46 0 20 $w =~ /$NONPRINT|$UNSAFEASCII/ || $u ne $w
838 0 0 45 $Params{'Encoding'} ne 'A' or $Params{'Detect7bit'} eq 'NO'
0 6 39 $Params{'Encoding'} ne 'A' or $Params{'Detect7bit'} eq 'NO' or $s =~ /$UNSAFE/
849 0 0 110 $Params{'Encoding'} eq 'S' || $Params{'Encoding'} eq 'A' && $obj->header_encoding eq 'S'
857 4 0 0 $csetobj->output_charset || $charsetobj->output_charset || $ascii->output_charset
982 30 113 136 scalar @lines && $lines[-1] =~ /[\r\n\t ]$/ || $s =~ /^[\r\n\t ]/
1016 0 0 185 not $charset->as_string or $charset->as_string eq '8BIT'
1034 0 0 46 &is_utf8($ustr) || $ustr =~ /$WIDECHAR/
1059 86 0 0 $restlen ||= $maxrestlen
1067 776 214 0 scalar @splitwords or defined $word
1192 0 0 162 not $GotParams{$i} or uc $GotParams{$i} eq 'NO'

xor 4 conditions

line l&&r l&&!r !l&&r !l&&!r condition
787 39 21 40 187 $w =~ /$NONPRINT|$UNSAFEASCII/ or $u ne $w xor $unsafe_last