Branch Coverage

blib/lib/Mail/Milter/Authentication/Tester.pm
Criterion Covered Total %
branch 80 128 62.5


line true false branch
33 0 296 if $milter_pid
35 0 296 unless (-e $prefix . "/authentication_milter.json")
42 0 296 unless defined $milter_pid
43 37 259 unless ($milter_pid)
65 7 190 unless $milter_pid
76 108 7 if $MASTER_PROCESS_PID != $$
94 190 380 if $line eq ""
98 7784 14447 if $line =~ /^#/u
120 190 0 if (-e $expected) { }
130 6090 5647 if ($key =~ /seconds_total/u) { }
0 5647 elsif ($key =~ /microseconds_sum/u) { }
190 5457 elsif ($key =~ /authmilter_forked_children_total/u) { }
380 5077 elsif ($key =~ /authmilter_processes_/u) { }
152 0 190 if ($ENV{'WRITE_METRICS'})
154 0 0 if ($key =~ /seconds_total/u) { }
0 0 elsif ($key =~ /microseconds_sum/u) { }
0 0 elsif ($key =~ /authmilter_forked_children_total/u) { }
0 0 elsif ($key =~ /authmilter_processes_/u) { }
155 0 0 if $metrics->{$key} > 0
158 0 0 if $metrics->{$key} > 0
161 0 0 if $metrics->{$key} > 0
164 0 0 if $metrics->{$key} > -1
180 0 953 unless (-e $args->{'prefix'} . "/authentication_milter.json")
183 0 953 unless (-e "data/source/" . $args->{'source'})
195 932 21 unless ($args->{'no_cat'})
213 898 21 if (not $args->{'no_cat'}) { }
225 0 97 unless (-e $args->{'prefix'} . "/authentication_milter.json")
286 0 886 unless (-e $args->{'prefix'} . "/authentication_milter.json")
289 0 886 unless (-e "data/source/" . $args->{'source'})
328 0 1016 if ($sock_type eq 'inet') { }
1016 0 elsif ($sock_type eq 'unix') { }
343 0 1016 if (!$line =~ /250/u)
347 0 1016 unless send_smtp_packet($sock, "EHLO " . $mailer_name, 250)
353 286 1016 unless ($first_time)
354 47 239 unless (send_smtp_packet($sock, "RSET", 250))
370 0 1255 if ($mail_file eq '-') { }
376 0 1255 unless (-e $mail_file)
389 0 1255 unless send_smtp_packet($sock, "XFORWARD NAME=" . $x_name, 250)
390 0 1255 unless send_smtp_packet($sock, "XFORWARD ADDR=" . $x_addr, 250)
391 0 1255 unless send_smtp_packet($sock, "XFORWARD HELO=" . $x_helo, 250)
393 0 1255 unless send_smtp_packet($sock, "MAIL FROM:" . $mail_from, 250)
394 0 1255 unless send_smtp_packet($sock, "RCPT TO:" . $rcpt_to, 250)
395 0 1255 unless send_smtp_packet($sock, "DATA", 354)
400 0 1255 unless send_smtp_packet($sock, ".", $eom_expect)
404 0 969 unless send_smtp_packet($sock, "QUIT", 221)
414 0 11056 unless defined $recv
418 11009 47 if ($recv =~ /^$expect/u) { }
433 0 1033 unless defined $cat_pid
434 995 38 if $cat_pid
447 0 38 if ($sock_type eq 'inet') { }
38 0 elsif ($sock_type eq 'unix') { }
474 0 353 if ($command =~ /^HELO/u) { }
38 315 elsif ($command =~ /^EHLO/u) { }
45 270 elsif ($command =~ /^MAIL/u) { }
135 135 elsif ($command =~ /^XFORWARD/u) { }
45 90 elsif ($command =~ /^RCPT/u) { }
7 83 elsif ($command =~ /^RSET/u) { }
45 38 elsif ($command =~ /^DATA/u) { }
38 0 elsif ($command =~ /^QUIT/u) { }
505 45 3004 if $line eq ".\r\n"
507 28 2976 if ($line =~ /^\./u)
528 82 3320 if grep {$i == $_;} @$remove
542 0 886 unless defined $pid
543 33 853 unless ($pid)