Condition Coverage

lib/Mail/SpamAssassin/Util.pm
Criterion Covered Total %
condition 79 173 45.6


and 3 conditions

line !l l&&!r l&&r condition
205 0 0 0 defined $blank and $blank
266 0 0 0 length $host <= 255 and $host =~ /^[a-z\d](?:[a-z\d-]{0,61}[a-z\d])?(?:\.[a-z\d](?:[a-z\d-]{0,61}[a-z\d])?)*$/i
405 0 0 0 $errno ne '' and $errno ne '0'
418 0 0 0 !defined($errno) || $errno == 0 and WIFEXITED($exit_status)
530 26 0 0 length $yyyy == 2 and $yyyy < 50
545 0 0 0 s/\b([A-Z]{2,4}(?:-DST)?)\b/ / and exists $TZ{$1}
583 8 0 0 !($yyyy % 4) && ($yyyy % 100 || !($yyyy % 400))
693 420 164 3254 $pos_mod != 0 and $overflow == 0
735 0 0 7 length($_) % 4 == 0 and m[^(?:[A-Za-z0-9+/=]{2,}={0,2})$]s
763 0 0 0 defined $decoded_length and length $out >= $decoded_length
953 0 0 8 $ip =~ /:/ && $ip =~ /^[0-9a-fA-F:.]{2,}\z/
1040 6 352 0 not $name and $ct =~ /\b(?:file)?name\*0\s*=/i
1065 68 21 269 $ct =~ /^text\b/ and not $ct =~ m[^text/(?:x-vcard|calendar|html)$]
1165 0 0 0 defined $file and $file ne ''
1201 0 0 65 defined $tmpdir and $tmpdir ne ''
1343 27 1 8 $nuri =~ tr/%02// and $nuri =~ /^(?:mailto:)?(?:\%20)*([^\@]+\@[^?&%]+)/
1455 0 0 4 defined $1 and index($1, '.') != -1
1466 390 0 6 $rest =~ m[(https?:/{0,2}[^&#]+)]i and index($1, '.') != -1
1498 6 5 329 $proto eq 'http://' and $auth eq ''
11 0 329 $proto eq 'http://' and $auth eq '' and $host ne 'localhost'
5 3 326 $proto eq 'http://' and $auth eq '' and $host ne 'localhost' and $port eq '80'
3 314 12 $proto eq 'http://' and $auth eq '' and $host ne 'localhost' and $port eq '80' and $host =~ /^(?:www\.)?([^.]+)$/
1554 0 0 10 defined $time and $time
1575 0 8 0 @rcvd and $rcvd[0] =~ /\bby localhost with \w+ \(fetchmail-[\d.]+/
1888 16 73 1162 $delim_end and not $delim_end =~ tr/)]}//
1923 3 0 1238 $ok and ref $compiled_re eq 'Regexp'
2041 0 0 0 eval { do { $compiled_re = qr/$re/; 1 } } and ref $compiled_re eq 'Regexp'

or 2 conditions

line l !l condition
541 26 0 $4 || 0
553 26 0 $tzoff ||= '-0000'
560 26 0 $hh ||= 0
26 0 $mm ||= 0
26 0 $ss ||= 0
26 0 $dd ||= 0
26 0 $mmm ||= 0
26 0 $yyyy ||= 0
667 365 0 shift() || ''
668 365 0 shift() || ''
669 192 173 shift() || ''
670 365 0 shift() || 77
671 5 360 shift() || 0
1004 163 195 $_[-1] || 'text/plain; charset=us-ascii'
1163 0 0 $args ||= {}
1562 10 0 $header ||= ''

or 3 conditions

line l !l&&r !l&&!r condition
299 82 0 0 $r eq 'SCALAR' or $r eq 'REF'
371 508 492 306 $cnt == 2 or $cnt == 1
405 0 0 0 0 + $errno != 0 or $errno ne '' and $errno ne '0'
418 0 0 0 !defined($errno) || $errno == 0
579 3 1 22 $mmm == 4 or $mmm == 6
4 5 17 $mmm == 4 or $mmm == 6 or $mmm == 9
6 0 17 $mmm == 4 or $mmm == 6 or $mmm == 9 or $mmm == 11
636 0 2 0 $time || time
672 173 192 0 shift() || qr/\s/
1065 0 337 21 not $ct or $ct =~ /^text\b/ and not $ct =~ m[^text/(?:x-vcard|calendar|html)$]
1199 0 65 0 $ENV{$tmpenv} || 'File::Spec'->tmpdir
1333 35 1 413 $nuri =~ /^mailto:/i or $nuri =~ /^[^:]*\@/
1570 0 0 8 $rcvd[0] =~ /qmail \d+ invoked by uid \d+/ or $rcvd[0] =~ /\bfrom (?:localhost\s|(?:\S+ ){1,2}\S*\b127\.0\.0\.1\b)/
1811 0 0 0 $] < 5.008 or am_running_on_windows()
1997 0 0 0 not defined $re or $re eq ''
2039 0 0 0 not defined $re or $re eq ''
2055 0 0 0 $lang ||= $ENV{'LANGUAGE'}
2056 0 0 0 $lang ||= $ENV{'LC_MESSAGES'}
2057 0 0 0 $lang ||= $ENV{'LANG'}
2122 6 32 0 $is_spam or $score < $rscore