Branch Coverage

blib/lib/Mail/Milter/Authentication/Tester.pm
Criterion Covered Total %
branch 79 126 62.7


line true false branch
36 0 180 if $milter_pid
38 0 180 unless (-e $prefix . '/authentication_milter.json')
45 0 180 unless defined $milter_pid
46 28 152 unless ($milter_pid)
68 7 97 unless $milter_pid
79 85 7 if $MASTER_PROCESS_PID != $$
97 97 194 if $line eq ''
101 3160 5516 if $line =~ /^#/
123 97 0 if (-e $expected) { }
133 2638 2820 if ($key =~ /seconds_total/) { }
0 2820 elsif ($key =~ /microseconds_sum/) { }
97 2723 elsif ($key =~ /authmilter_forked_children_total/) { }
194 2529 elsif ($key =~ /authmilter_processes_/) { }
155 0 97 if ($ENV{'WRITE_METRICS'})
157 0 0 if ($key =~ /seconds_total/) { }
0 0 elsif ($key =~ /microseconds_sum/) { }
0 0 elsif ($key =~ /authmilter_forked_children_total/) { }
0 0 elsif ($key =~ /authmilter_processes_/) { }
158 0 0 if $metrics->{$key} > 0
161 0 0 if $metrics->{$key} > 0
164 0 0 if $metrics->{$key} > 0
167 0 0 if $metrics->{$key} > -1
185 0 638 unless (-e $args->{'prefix'} . '/authentication_milter.json')
188 0 638 unless (-e 'data/source/' . $args->{'source'})
200 627 11 unless ($args->{'no_cat'})
218 600 11 if (not $args->{'no_cat'}) { }
232 0 77 unless (-e $args->{'prefix'} . '/authentication_milter.json')
295 0 590 unless (-e $args->{'prefix'} . '/authentication_milter.json')
298 0 590 unless (-e 'data/source/' . $args->{'source'})
339 0 688 if ($sock_type eq 'inet') { }
688 0 elsif ($sock_type eq 'unix') { }
354 0 688 if (!$line =~ /250/)
358 0 688 unless send_smtp_packet($sock, 'EHLO ' . $mailer_name, '250')
364 226 688 unless ($first_time)
365 37 189 unless (send_smtp_packet($sock, 'RSET', '250'))
381 0 877 if ($mail_file eq '-') { }
387 0 877 unless (-e $mail_file)
400 0 877 unless send_smtp_packet($sock, 'XFORWARD NAME=' . $x_name, '250')
401 0 877 unless send_smtp_packet($sock, 'XFORWARD ADDR=' . $x_addr, '250')
402 0 877 unless send_smtp_packet($sock, 'XFORWARD HELO=' . $x_helo, '250')
404 0 877 unless send_smtp_packet($sock, 'MAIL FROM:' . $mail_from, '250')
405 0 877 unless send_smtp_packet($sock, 'RCPT TO:' . $rcpt_to, '250')
406 0 877 unless send_smtp_packet($sock, 'DATA', '354')
411 0 877 unless send_smtp_packet($sock, '.', $eom_expect)
415 0 651 unless send_smtp_packet($sock, 'QUIT', '221')
428 7667 37 if ($recv =~ /^$expect/) { }
441 0 708 unless defined $cat_pid
442 677 31 if $cat_pid
455 0 31 if ($sock_type eq 'inet') { }
31 0 elsif ($sock_type eq 'unix') { }
482 0 297 if ($command =~ /^HELO/) { }
31 266 elsif ($command =~ /^EHLO/) { }
38 228 elsif ($command =~ /^MAIL/) { }
114 114 elsif ($command =~ /^XFORWARD/) { }
38 76 elsif ($command =~ /^RCPT/) { }
7 69 elsif ($command =~ /^RSET/) { }
38 31 elsif ($command =~ /^DATA/) { }
31 0 elsif ($command =~ /^QUIT/) { }
513 38 2289 if $line eq ".\r\n"
515 28 2261 if ($line =~ /^\./)
536 68 2556 if grep {$i == $_;} @$remove
550 0 590 unless defined $pid
551 26 564 unless ($pid)