Branch Coverage

lib/Sisimai/ARF.pm
Criterion Covered Total %
branch 72 82 87.8


line true false branch
20 101 30 if ($heads->{'content-type'} =~ /report-type=["]?feedback-report["]?/) { }
19 11 elsif (index($heads->{'content-type'}, 'multipart/mixed') > -1) { }
28 15 4 if ($p =~ /$reportfrom/ and index($heads->{'subject'}, "complaint about message from ") > -1)
47 0 81 unless is_arf(undef, $mhead)
124 66 2445 if $e =~ /$markingsof->{'message'}/
126 538 1973 unless ($readcursor)
128 66 472 if index($e, $startingof->{'report'}[0]) == 0
131 1238 1273 unless ($readcursor & $indicators->{'message-rfc822'})
133 76 1162 if (index($e, $startingof->{'rfc822'}[0]) == 0 or index($e, $startingof->{'rfc822'}[1]) == 0)
140 1273 1162 if ($readcursor & $indicators->{'message-rfc822'}) { }
142 15 1258 if ($e =~ /X-HmXmrOriginalRecipient:[ ]*(.+)\z/) { }
71 1187 elsif ($e =~ /\AFrom:[ ]*(.+)\z/) { }
207 980 elsif ($e =~ /\A[ \t]+/) { }
160 5 202 if ($previousfn eq 'from') { }
166 0 202 if exists $longfields->{$previousfn}
167 202 0 if length $e
169 0 0 if $previousfn eq "to"
174 121 859 unless $lhs = lc($lhs || '')
177 550 309 unless exists $rfc822head->{$lhs}
181 66 243 if $lhs eq "to"
185 457 705 unless $readcursor & $indicators->{'deliverystatus'}
186 61 644 unless length $e
197 71 573 if ($e =~ /\AOriginal-Rcpt-To:[ ]+[<]?(.+)[>]?\z/ or $e =~ /\ARedacted-Address:[ ]([^ ].+[\@])\z/) { }
66 507 elsif ($e =~ /\AFeedback-Type:[ ]*([^ ]+)\z/) { }
25 482 elsif ($e =~ /\AAuthentication-Results:[ ]*(.+)\z/) { }
66 416 elsif ($e =~ /\AUser-Agent:[ ]*(.+)\z/) { }
51 365 elsif ($e =~ /\A(?:Received|Arrival)-Date:[ ]*(.+)\z/) { }
0 365 elsif ($e =~ /\AReporting-MTA:[ ]*dns;[ ]*(.+)\z/) { }
46 319 elsif ($e =~ /\ASource-I[Pp]:[ ]*(.+)\z/) { }
50 269 elsif ($e =~ /\AOriginal-Mail-From:[ ]*(.+)\z/) { }
203 35 36 if ($v->{'recipient'})
254 15 0 if ($arfheaders->{'feedbacktype'} eq "auth-failure" and $arfheaders->{'authres'})
259 30 51 unless ($recipients)
261 15 15 if ($rfc822part =~ /^To: (.+[\@].+)$/m) { }
273 81 0 unless ($rfc822part =~ /\bFrom: [^ ]+[\@][^ ]+\b/)
276 76 5 if $commondata->{'from'}
279 15 66 if ($mhead->{'subject'} =~ /complaint about message from (\d{1,3}[.]\d{1,3}[.]\d{1,3}[.]\d{1,3})/)
289 6 110 if $e->{'recipient'} =~ /\A[^ ]+[\@]\z/
303 96 20 if $e->{'rhost'}
304 0 20 if ($commondata->{'rhost'}) { }
0 20 elsif ($e->{'diagnosis'} =~ /\breceived from IP address ([^ ]+)/) { }