Branch Coverage

lib/Sisimai/Lhost/Exim.pm
Criterion Covered Total %
branch 110 132 83.3


line true false branch
19 0 542 if $mhead->{'from'} =~ /[\@].+[.]mail[.]ru[>]?/
23 233 309 if index($mhead->{'from'}, "Mail Delivery System") == 0
25 172 370 if defined $mhead->{'message-id'} and $mhead->{'message-id'} =~ /\A[<]\w{7}[-]\w{6}[-]\w{2}[\@]/
26 295 247 if $mhead->{'subject'} =~ qr/(?: Mail[ ]delivery[ ]failed(:[ ]returning[ ]message[ ]to[ ]sender)? |Warning:[ ]message[ ][^ ]+[ ]delayed[ ]+ |Delivery[ ]Status[ ]Notification |Mail[ ]failure |Message[ ]frozen |error[(]s[)][ ]in[ ]forwarding[ ]or[ ]filtering ) /x
35 319 223 if $match < 2
163 41 182 if ($mhead->{'content-type'})
172 263 2444 unless ($readcursor)
174 223 40 if ($e =~ /$markingsof->{'message'}/)
176 223 0 unless $e =~ /$markingsof->{'frozen'}/
179 40 2444 unless $readcursor & $indicators->{'deliverystatus'}
180 615 1829 unless length $e
192 187 1642 if ($e =~ /\A[ \t]{2}([^ \t]+[\@][^ \t]+[.]?[a-zA-Z]+)(:.+)?\z/ or $e =~ /\A[ \t]{2}[^ \t]+[\@][^ \t]+[.][a-zA-Z]+[ ]<(.+?[\@].+?)>:.+\z/ or $e =~ /$markingsof->{'alias'}/) { }
31 1611 elsif ($e =~ /\A[ ]+[(]generated[ ]from[ ](.+)[)]\z/ or $e =~ /\A[ ]+generated[ ]by[ ]([^ \t]+[\@][^ \t]+)/) { }
204 5 182 if ($v->{'recipient'})
210 5 182 if ($e =~ /\A[ \t]+[^ \t]+[\@][^ \t]+[.][a-zA-Z]+[ ]<(.+?[\@].+?)>:.+\z/)
233 0 1611 unless length $e
235 0 1611 if ($e =~ /$markingsof->{'frozen'}/) { }
241 355 1256 if ($boundary00) { }
245 160 195 if ('Sisimai::RFC1894'->match($e)) { }
247 0 160 unless my $o = "Sisimai::RFC1894"->field($e)
249 30 130 if ($o->[-1] eq 'addr') { }
20 110 elsif ($o->[-1] eq 'code') { }
251 0 30 unless $o->[0] eq "final-recipient"
252 25 5 rindex($o->[2], '@') > -1 ? :
261 0 110 unless exists $$fieldtable{$o->[0]}
266 0 195 if $nextcursor
268 0 195 if index($e, $startingof->{'deliverystatus'}) == 0
269 85 110 if index($e, " ") == 0
272 524 732 if (scalar @$dscontents == $recipients) { }
274 0 524 unless length $e
280 5 727 if ($e =~ m[\A[ ]+pipe[ ]to[ ][|]/[^ ]+]) { }
286 666 61 unless index($e, " ") == 0
295 182 41 if ($recipients) { }
299 181 6 unless $q->{'alias'}
300 0 6 if (not $q->{'recipient'} or rindex($q->{'recipient'}, "\@") == -1)
307 30 11 if (defined $mhead->{'x-failed-recipients'})
316 30 0 if scalar @$dscontents == $recipients
321 11 212 unless $recipients
323 206 6 if (scalar @{$mhead->{'received'};})
326 206 0 if $mhead->{'received'}[-1] =~ /from[ \t]([^ ]+) /
333 10 207 if (not $e->{'diagnosis'} and length $boundary00 > 0)
350 10 0 if ($dscontents->[0]{'alterrors'})
356 45 0 if (exists $e->{'alterrors'} and $e->{'alterrors'})
360 0 45 if (index($e->{'diagnosis'}, '-') == 0 or substr($e->{'diagnosis'}, -2, 2) eq '__') { }
362 0 0 if $e->{'alterrors'}
366 20 25 if (length $e->{'diagnosis'} < length $e->{'alterrors'})
369 20 0 if ($e->{'alterrors'} =~ /$rxdiagnosis/)
381 187 30 unless ($e->{'rhost'})
384 72 115 if $e->{'diagnosis'} =~ /host[ \t]+([^ \t]+)[ \t]\[.+\]:[ \t]/
386 115 0 if (not $e->{'rhost'} and scalar @{$mhead->{'received'};})
393 217 0 unless ($e->{'command'})
397 211 172 unless $e->{'diagnosis'} =~ /$r/
403 5 212 if ($e->{'command'} eq 'HELO' or $e->{'command'} eq 'EHLO') { }
71 141 elsif ($e->{'command'} eq 'MAIL') { }
416 927 15 unless grep {index($e->{'diagnosis'}, $_) > -1;} @{$$messagesof{$r};}
421 126 15 unless ($e->{'reason'})
423 10 116 if grep {index($e->{'diagnosis'}, $_) > -1;} @$delayedfor
446 117 100 if $sv
447 40 60 unless $rv
452 10 50 if ($r1 == 4) { }
50 0 elsif ($r1 == 5) { }
463 142 75 if $sv
465 30 187 if $e->{'status'}
467 177 40 if ($v1 > 0) { }
470 60 117 if $r1 > 0
474 15 25 if ($e->{'reason'} eq 'expired' or $e->{'reason'} eq 'mailboxfull') { }