Branch Coverage

blib/lib/Text/FindIndent.pm
Criterion Covered Total %
branch 113 162 69.7


line true false branch
20 0 21 ref $text ? :
23 0 21 $opts{'first_level_indent_only'} ? :
35 0 21 if (exists $modeline_settings{'softtabstop'} and exists $modeline_settings{'usetabs'}) { }
0 21 elsif (exists $modeline_settings{'tabstop'} and $modeline_settings{'usetabs'}) { }
1 20 elsif (exists $modeline_settings{'tabstop'} and exists $modeline_settings{'usetabs'}) { }
37 0 0 unless defined $modeline_settings{'mixedmode'}
41 0 0 $modeline_settings{'mixedmode'} ? :
44 0 0 $modeline_settings{'mixedmode'} ? :
60 37 367 if ($lines < 3)
69 10 394 if ($class->_check_vim_modeline($fullline, \%modeline_settings) or $changed_modelines)
70 2 8 if (exists $modeline_settings{'softtabstop'} and exists $modeline_settings{'usetabs'}) { }
2 6 elsif (exists $modeline_settings{'tabstop'} and $modeline_settings{'usetabs'}) { }
3 3 elsif (exists $modeline_settings{'tabstop'} and exists $modeline_settings{'usetabs'}) { }
72 2 0 unless defined $modeline_settings{'mixedmode'}
76 1 1 $modeline_settings{'mixedmode'} ? :
79 1 1 $modeline_settings{'mixedmode'} ? :
86 0 397 if ($lines > 500)
90 0 397 if ($skip)
95 4 47 if ($skip_pod and $ws eq '' and substr($rest, 0, 1) eq '=')
96 2 2 if (not $in_pod and $rest =~ /^=(?:head\d|over|item|back|pod|begin|for|end)/) { }
2 0 elsif ($in_pod and $rest =~ /^=cut/) { }
104 45 352 if $in_pod or $rest eq ''
106 99 253 if ($ws eq '')
113 0 253 if $rest =~ /\\$/
116 0 253 if $rest =~ m[^(?:#|//|/\*)]
118 10 243 if ($next_line_braces_pos_plus_1) { }
119 8 2 if ($next_line_braces_pos_plus_1 == _length_with_tabs_converted($ws))
124 2 241 if ($rest =~ /=> \{$/)
129 0 245 if ($first_level_indent_only and $prev_indent ne '')
133 70 175 if ($prev_indent eq $ws)
134 70 0 if ($prev_indent_type)
142 75 100 if ($ws =~ /^\Q$prev_indent\E(.+)$/)
152 42 58 if ($prev_indent =~ /^\Q$ws\E(.+)$/)
168 58 0 if ($len_diff)
177 1 12 unless keys %indentdiffs
182 20 7 if $value > $max
185 8 4 if ($maxkey =~ /^s(\d+)$/)
188 3 5 if (defined $mixed and $mixed >= $max * 0.2)
195 6 30 if (not exists $modeline_settings{$key} and exists $modeline_settings{"style_$key"})
201 3 9 if (exists $modeline_settings{'softtabstop'}) { }
1 8 elsif (exists $modeline_settings{'tabstop'}) { }
207 2 10 if (exists $modeline_settings{'usetabs'})
208 2 0 if ($modeline_settings{'usetabs'}) { }
209 1 1 $2 == 8 ? :
0 2 $1 eq 'u' ? :
217 0 12 if ($modeline_settings{'mixedmode'})
237 0 0 if ($diff =~ /^ +$/) { }
0 0 elsif ($diff =~ /^\t+$/) { }
251 102 15 if ($diff =~ /^ +$/) { }
15 0 elsif ($diff =~ /^\t+$/) { }
335 398 6 unless $line =~ /$VimModeLineStart/
337 2 4 if ($line =~ /$VimModelineTypeOne/) { }
4 0 elsif ($line =~ /$VimModelineTypeTwo/) { }
347 0 6 unless @options
351 3 11 if /s(?:ts|ofttabstop)=(\d+)/i
352 4 7 if /t(?:s|abstop)=(\d+)/i
353 4 3 if /((?:no)?)(?:expandtab|et)/i
431 4 33 if ($line =~ /$FirstLineRegexp/)
435 1 6 if ($key eq 'tab-width') { }
3 3 elsif ($key eq 'indent-tabs-mode') { }
2 1 elsif ($key eq 'c-basic-offset') { }
1 0 elsif ($key eq 'style') { }
440 3 0 if defined $tabmodelookup{$value}
447 1 0 if defined $stylelookup{$value}
496 5 508 if ($settings->{'in_local_variables_section'}) { }
2 506 elsif ($line =~ /^\s*(\S*)\s*Local Variables:\s*(\S*)\s*$/) { }
498 0 5 unless defined $prefix
501 0 5 unless defined $suffix
504 3 2 if ($line =~ /^\s*$prefix\s*([^\s:]+):\s*(.+)$suffix\s*$/) { }
508 0 3 if ($key eq 'tab-width') { }
1 2 elsif ($key eq 'indent-tabs-mode') { }
1 1 elsif ($key eq 'c-basic-offset') { }
1 0 elsif ($key eq 'style') { }
512 1 0 if defined $tabmodelookup{$value}
518 1 0 if defined $stylelookup{$value}
540 21 0 if $start < 0
553 0 0 if $indent eq 'Text::FindIndent'
554 0 0 if ref $indent or length $indent > 5
557 0 0 if ($indent =~ /^t(\d+)/) { }
0 0 elsif ($indent =~ /^s(\d+)/) { }
0 0 elsif ($indent =~ /^m(\d+)/) { }