Branch Coverage

blib/lib/Test2/Harness/Parser/TAP.pm
Criterion Covered Total %
branch 87 96 90.6


line true false branch
42 4247 1301 defined $_->in_subtest ? :
48 9471 50 unless my $line = $self->proc->get_err_line('peek', 1)
50 46 4 if $line =~ /^\s*#/
55 0 4 unless length $out
62 8246 1265 unless my $line = $self->proc->get_out_line('peek', 1)
64 55 1210 if $line =~ /^\s*#/
69 1204 6 if @events
72 6 0 unless length $out
81 4621 1170 $line =~ /^(\s+)(.+)$/ ? :
91 5451 2321 if (@events = $self->$sub($str, $nest))
103 1301 4490 unless my($st_ok, @errors) = $self->parse_tap_ok($line, $nest)
104 3804 686 unless $line =~ /\s*\{\s*\)?\s*$/
113 0 5267 unless (defined $line)
115 0 0 if $count++ > 10
119 686 4581 if $line =~ /^\s*\}\s*$/
136 32 654 if defined $todo
139 686 0 if defined $name
161 1301 4538 unless $line =~ s/^(not )?ok\b//
164 2 4536 if $line and not $line =~ /^ /
167 4504 34 if ($line =~ s/^(\s*)(\d+)\b//)
171 2 4502 if length $space > 1
177 75 4463 if ($line =~ s/#\s*(todo & skip|todo|skip)(.*)$//i)
180 2 73 unless $line =~ s/\s+$//
183 2 73 if $reason and not $reason =~ s/^\s+//
186 29 46 if $directive =~ /skip/i
187 50 25 if $directive =~ /todo/i
199 12 4526 if ($line =~ /^Subtest: (.+)$/) { }
29 4497 elsif (defined $skip) { }
211 46 4451 defined $todo ? :
229 342 4 unless $line =~ s/^TAP version\s*//
241 344 969 unless $line =~ s/^1\.\.(\d+)//
246 23 946 if ($max == 0)
247 19 4 if ($line =~ s/^\s*#\s*//)
248 19 0 if ($line =~ s/^(skip)\S*\s*//i)
266 967 2 unless $line =~ /\S/
280 342 4 unless $line =~ s/^Bail out! *//
292 56 59 $io eq 'STDERR' ? :
297 0 115 unless defined $nest and defined $diag
300 6 109 $diag =~ /^Failed test/ ? :
303 91 971 unless my $line = $self->proc->$meth('peek', 1)
305 12 959 unless defined $lnest and defined $msg
306 4 955 if $lnest != $nest
307 2 953 if $msg =~ /^Failed test/
308 2 951 if $failed and not $msg =~ /^at /
312 951 0 if $msg
313 4 947 if $failed
316 56 59 $io eq 'STDERR' ? :
327 14 23 unless $msg or $hash or $space