Condition Coverage

blib/lib/MIME/EncWords.pm
Criterion Covered Total %
condition 118 180 65.5


and 2 conditions

line l !l condition
1029 103 0 not $charset->decoder and "Encode"
1040 0 46 not &is_utf8($ustr) || $ustr =~ /$WIDECHAR/ and "Encode"

and 3 conditions

line !l l&&!r l&&r condition
199 0 0 57 length($str) % 4 == 0 and $str =~ m[^[A-Za-z0-9+/]+={0,2}$]
392 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 0 24 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
445 0 87 0 $charset and $charset ne &MIME::Charset::default()
481 29 37 0 $charset->as_string and $charset->as_string eq $cset->as_string
758 1 43 24 $charsetobj->as_string and $charsetobj->as_string =~ /$ASCIIINCOMPAT/
780 5 352 6 $charsetobj->as_string and $charsetobj->as_string =~ /$ASCIITRANS/
834 48 103 66 $csetobj->as_string and $csetobj->as_string =~ /$ASCIIINCOMPAT/
858 106 54 57 defined $enc and $Params{'Encoding'} eq 'S' || $Params{'Encoding'} eq 'A' && $obj->header_encoding eq 'S'
861 111 0 106 $cset eq "US-ASCII" and not $enc
111 99 7 $cset eq "US-ASCII" and not $enc and $s =~ /$UNSAFEASCII/
886 0 97 28 $csetobj->decoder and ($lastcsetobj->as_string || '') eq $csetobj->as_string
97 2 26 $csetobj->decoder and ($lastcsetobj->as_string || '') eq $csetobj->as_string and ($lastenc || '') eq ($enc || '')
67 0 32 not $lastenc and $enc
67 25 7 not $lastenc and $enc and not $last =~ /[\r\n\t ]$/
25 1 66 $lastenc and not $enc
26 50 16 $lastenc and not $enc and not $s =~ /^[\r\n\t ]/
921 0 36 7 $Params{'Encoding'} eq "A" and $b
36 0 7 $Params{'Encoding'} eq "A" and $b and not $q
0 0 36 $Params{'Encoding'} eq "A" and not $b
0 36 0 $Params{'Encoding'} eq "A" and not $b and $q
940 36 7 44 $_->[1] and $_->[1] eq "S"
945 0 92 0 scalar @triplets and $triplets[0][0] =~ s/^[\r\n\t ]+//
1026 103 0 88 not $encoding and $charset->as_string eq "US-ASCII"
1046 0 41 5 $first and not $str
41 1 4 $first and not $str and $maxrestlen < $charset->encoded_header_len($first, $encoding)
1206 67 0 537 $GotParams{$i} &&= uc $GotParams{$i}

or 2 conditions

line l !l condition
373 4 0 $2 || undef
374 4 0 $charset ||= undef
392 81 0 $charset || ''
39 42 $tokens[-1][1] || ''
542 148 0 shift() || 'Q'
543 148 0 shift() || 'ISO-8859-1'
544 0 148 shift() || ''
729 0 92 $2 || ' '
831 169 48 $cset || ''
871 3 2 $csetobj->header_encoding || 'Q'
886 125 0 $lastcsetobj->as_string || ''
16 12 $lastenc || ''
16 12 $enc || ''
1178 636 184 $params{$k} || []

or 3 conditions

line l !l&&r !l&&!r condition
178 0 0 0 $cset eq "UTF-16" or $cset eq "UTF-16BE"
0 0 0 $cset eq "UTF-32" or $cset eq "UTF-32BE"
392 24 0 0 !($tokens[-1][2] || $language) || lc $tokens[-1][2] eq lc $language
443 36 46 87 $t->[0] =~ /$UNSAFE/ or $t->[1]
476 29 37 0 $cset->decoder or $cset->as_string eq "_UNICODE_"
488 0 0 66 &is_utf8($s) or $s =~ /$WIDECHAR/
547 0 0 148 &is_utf8($word) or $word =~ /$WIDECHAR/
772 590 68 0 scalar @words or length $w
783 0 0 6 &is_utf8($w) or $w =~ /$WIDECHAR/
807 48 0 20 $w =~ /$NONPRINT|$UNSAFEASCII/ || $u ne $w
844 0 0 48 $Params{'Encoding'} ne "A" or $Params{'Detect7bit'} eq "NO"
0 6 42 $Params{'Encoding'} ne "A" or $Params{'Detect7bit'} eq "NO" or $s =~ /$UNSAFE/
858 0 57 54 $Params{'Encoding'} eq 'S' || $Params{'Encoding'} eq 'A' && $obj->header_encoding eq 'S'
863 5 2 0 $csetobj->output_charset || $charsetobj->output_charset || $ascii->output_charset
988 32 115 138 scalar @lines && $lines[-1] =~ /[\r\n\t ]$/ || $s =~ /^[\r\n\t ]/
1022 0 0 191 not $charset->as_string or $charset->as_string eq "8BIT"
1040 0 0 46 &is_utf8($ustr) || $ustr =~ /$WIDECHAR/
1065 88 0 0 $restlen ||= $maxrestlen
1073 786 220 0 scalar @splitwords or defined $word
1198 0 0 164 not $GotParams{$i} or uc $GotParams{$i} eq "NO"

xor 4 conditions

line l&&r l&&!r !l&&r !l&&!r condition
793 39 23 42 191 $w =~ /$NONPRINT|$UNSAFEASCII/ or $u ne $w xor $unsafe_last