Branch Coverage

lib/Sisimai/Lhost/Exim.pm
Criterion Covered Total %
branch 116 132 87.8


line true false branch
30 325 1070 if index($mhead->{'from'}, "Mail Delivery System") != -1
34 1027 223 if index($messageidv, "<") != 0 or index($messageidv, "-") != 8 or index($messageidv, "\@") != 18
41 3649 879 if index($mhead->{'subject'}, $e) == -1
47 11 1384 if exists $mhead->{'x-mx-bounce'}
48 0 1395 if exists $mhead->{'x-mxl-hash'}
49 11 1384 if exists $mhead->{'x-mxl-notehash'}
50 16 1379 if index($messageidv, "
51 1094 301 if $proceedsto < 2 and $thirdparty == 0
165 5 296 if (index($$mbody, "\n----- This is a copy ") != -1)
182 119 182 if $mhead->{'content-type'}
188 1039 3395 unless ($readcursor)
190 296 743 if (grep {index($e, $_) != -1;} @{$$startingof{"message"}})
193 296 0 unless grep {index($e, $_) != -1;} @{$$startingof{"frozen"}}
196 1554 2584 if ($readcursor & $indicators->{'deliverystatus'}) == 0 or $e eq ""
212 1547 1037 if index($e, " ") != 0
213 483 554 if index($e, "\@") < 2
214 0 554 if index($e, ".") < 2
215 10 544 if index($e, "pipe to |") != -1
218 270 274 if $cx eq " "
219 10 264 if $thirdparty == 0 and $cx eq "<"
224 264 2320 if ($ce == 1 or grep {index($e, $_) > 0;} @{$$startingof{'alias'}}) { }
36 2284 elsif (index($e, ' (generated from ') > 0 or index($e, ' generated by ') > 0) { }
226 10 254 if ($v->{'recipient'})
232 0 264 if (grep {index($e, $_) > 0;} @{$$startingof{'alias'}}) { }
246 21 243 if ($p1 > 1 and $p2 > 1) { }
264 0 264 unless "Sisimai::Address"->is_emailaddress($cv)
275 87 31 if index($f, "\@") == -1
279 0 2284 if (grep {index($e, $_) != -1;} @{$$startingof{'frozen'}}) { }
355 1929 elsif ($boundary00) { }
288 160 195 if ('Sisimai::RFC1894'->match($e)) { }
290 0 160 unless my $o = "Sisimai::RFC1894"->field($e)
292 30 130 if ($o->[3] eq 'addr') { }
20 110 elsif ($o->[3] eq 'code') { }
294 0 30 unless $o->[0] eq "final-recipient"
295 25 5 rindex($o->[2], '@') != -1 ? :
304 0 110 unless exists $$fieldtable{$o->[0]}
309 5 190 if $nextcursor
312 30 160 if index($e, $startingof->{'deliverystatus'}[0]) == 0
313 80 110 if index($e, " ") == 0
317 711 1218 if (scalar @$dscontents == $recipients) { }
325 1172 46 unless index($e, " ") == 0
332 254 47 if ($recipients) { }
336 258 6 unless $q->{'alias'}
337 0 6 if (not $q->{'recipient'} or rindex($q->{'recipient'}, "\@") == -1)
344 25 22 if (defined $mhead->{'x-failed-recipients'})
353 25 0 if scalar @$dscontents == $recipients
358 22 279 unless $recipients
368 10 279 if (not $e->{'diagnosis'} and length $boundary00 > 0)
384 10 0 if $dscontents->[0]{'alterrors'}
387 30 259 if ($e->{'alterrors'})
391 0 30 if (index($e->{'diagnosis'}, '-') == 0 or substr($e->{'diagnosis'}, -2, 2) eq '__') { }
20 10 elsif (length $e->{'diagnosis'} < length $e->{'alterrors'}) { }
399 20 0 if index(lc $e->{'alterrors'}, lc $e->{'diagnosis'}) != -1
404 0 289 if $p1 > 1
406 269 20 unless ($e->{'rhost'})
411 193 76 if $p1 > -1
416 289 0 unless ($e->{'command'})
420 182 213 if index($e->{'diagnosis'}, $r) == -1
426 5 284 if ($e->{'command'} eq 'HELO' or $e->{'command'} eq 'EHLO') { }
76 208 elsif ($e->{'command'} eq 'MAIL') { }
438 1371 25 unless grep {index($e->{'diagnosis'}, $_) != -1;} @{$$messagesof{$r}}
443 183 25 unless ($e->{'reason'})
445 15 168 if grep {index($e->{'diagnosis'}, $_) != -1;} @$delayedfor
446 10 173 if index($e->{'diagnosis'}, "pipe to |") != -1
468 25 254 if ("Sisimai::SMTP::Failure"->is_temporary($cr) or $re eq "expired" or $re eq "mailboxfull")
470 25 10 if "Sisimai::Reason"->is_explicit($re)