Branch Coverage

lib/Sisimai/Lhost/GSuite.pm
Criterion Covered Total %
branch 56 68 82.3


line true false branch
19 469 219 unless rindex($mhead->{'from'}, "") > -1
20 0 219 unless index($mhead->{'subject'}, "Delivery Status Notification") > -1
21 56 163 unless $mhead->{'x-gm-message-state'}
54 5789 1458 unless ($readcursor)
56 71 5718 if $e =~ /$markingsof->{'message'}/
58 5718 1529 unless $readcursor & $indicators->{'deliverystatus'}
60 610 919 if (my $f = 'Sisimai::RFC1894'->match($e)) { }
62 0 610 unless my $o = "Sisimai::RFC1894"->field($e)
65 71 539 if ($o->[-1] eq 'addr') { }
66 473 elsif ($o->[-1] eq 'code') { }
68 71 0 if ($o->[0] eq 'final-recipient') { }
70 0 71 if ($v->{'recipient'})
89 71 402 unless exists $$fieldtable{$o->[0]}
92 21 381 if ($$fieldtable{$o->[0]} eq "lhost")
94 21 0 if index $v->{'lhost'}, "\@"
97 239 163 unless $f == 1
102 90 829 if (not $endoferror and $v->{'diagnosis'}) { }
66 763 elsif ($e =~ /$markingsof->{'error'}/) { }
104 0 90 if $e eq ""
105 0 90 if $endoferror
120 71 692 if $e =~ /\AContent-Type:/
121 621 71 if ($anotherset->{'diagnosis'}) { }
124 15 606 if $emptylines > 5
125 359 247 unless (length $e)
137 0 71 unless $e =~ /$markingsof->{'message'}/
143 92 71 unless $recipients
150 71 0 if (exists $anotherset->{'diagnosis'} and $anotherset->{'diagnosis'})
153 0 71 if ($e->{'diagnosis'} =~ /\A\d+\z/) { }
162 51 20 if ($e->{'status'} eq "" or $e->{'status'} eq "5.0.0" or $e->{'status'} eq "4.0.0")
165 6 45 if (length $as > 0 and substr($as, -4, 4) ne ".0.0")
171 0 0 if ($e->{'replycode'} eq "" or $e->{'replycode'} eq 500 or $e->{'replycode'} eq 400)
174 26 45 if (length $ar > 0 and substr($ar, -2, 2) ne "00")
180 26 45 if ($as or $ar and length $anotherset->{'diagnosis'} > length $e->{'diagnosis'})
190 136 36 unless grep {index($e->{'diagnosis'}, $_) > -1;} @{$$messagesof{$q};}