Branch Coverage

blib/lib/Syntax/Highlight/Engine/Simple.pm
Criterion Covered Total %
branch 33 42 78.5


line true false branch
17 0 6 if ($self->{'type'})
81 0 13 unless defined $args{'str'}
83 4 9 if ($args{'tab_width'} > 0)
115 0 4 unless open my $filehandle, '<' . $args{'file'}
119 513 0 if ($args{'tab_width'} > 0)
157 608 608 if (defined $pos->[1]) { }
175 70 18 unless (exists $self->{'syntax'}[$_[0]]{'container'})
181 1 17 if (ref $allowed eq 'ARRAY') { }
17 0 elsif ($allowed) { }
210 746 88 if (scalar @scraps >= 2) { }
59 29 elsif (@$map_ref) { }
232 0 9189 unless $Syntax::Highlight::Engine::Simple::a->[0] <=> $Syntax::Highlight::Engine::Simple::b->[0] or $Syntax::Highlight::Engine::Simple::b->[1] <=> $Syntax::Highlight::Engine::Simple::a->[1]
261 589 270 if ($root[$j][1] <= $map_ref->[$i][0])
270 657 89 if (not exists $syntax_ref->{'container'}) { }
271 525 132 unless (scalar @root)
280 88 0 if ($root[$j][1] > $map_ref->[$i][0])
283 88 0 if ($root[$j][1] >= $map_ref->[$i][1])
288 83 5 if (exists $syntax_ref->{'_cont_hash'}{$root_class})
299 138 608 unless ($ok)
325 950 0 defined $width ? :
328 406 544 if (scalar @scraps == 2)