Branch Coverage

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


line true false branch
18 0 21 ref $text ? :
21 0 21 $opts{'first_level_indent_only'} ? :
33 0 21 if (exists $modeline_settings{'softtabstop'} and exists $modeline_settings{'usetabs'}) { }
0 21 elsif (exists $modeline_settings{'tabstop'} and $modeline_settings{'usetabs'}) { }
1 40 elsif (exists $modeline_settings{'tabstop'} and exists $modeline_settings{'usetabs'}) { }
34 0 0 unless defined $modeline_settings{'mixedmode'}
37 0 0 $modeline_settings{'mixedmode'} ? :
42 0 0 $modeline_settings{'mixedmode'} ? :
58 37 367 if ($lines < 3)
67 10 394 if ($class->_check_vim_modeline($fullline, \%modeline_settings) or $changed_modelines)
68 2 8 if (exists $modeline_settings{'softtabstop'} and exists $modeline_settings{'usetabs'}) { }
2 6 elsif (exists $modeline_settings{'tabstop'} and $modeline_settings{'usetabs'}) { }
3 4 elsif (exists $modeline_settings{'tabstop'} and exists $modeline_settings{'usetabs'}) { }
69 2 0 unless defined $modeline_settings{'mixedmode'}
72 1 1 $modeline_settings{'mixedmode'} ? :
77 1 1 $modeline_settings{'mixedmode'} ? :
84 0 397 if ($lines > 500)
88 0 397 if ($skip)
93 4 47 if ($skip_pod and $ws eq '' and substr($rest, 0, 1) eq '=')
94 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/) { }
102 45 352 if $in_pod or $rest eq ''
104 99 253 if ($ws eq '')
111 0 253 if $rest =~ /\\$/
114 0 253 if $rest =~ m[^(?:#|//|/\*)]
116 10 243 if ($next_line_braces_pos_plus_1) { }
117 8 2 if ($next_line_braces_pos_plus_1 == _length_with_tabs_converted($ws))
122 2 241 if ($rest =~ /=> {$/)
127 0 245 if ($first_level_indent_only and $prev_indent ne '')
131 70 175 if ($prev_indent eq $ws)
132 70 0 if ($prev_indent_type)
140 75 100 if ($ws =~ /^\Q$prev_indent\E(.+)$/)
150 42 58 if ($prev_indent =~ /^\Q$ws\E(.+)$/)
166 58 0 if ($len_diff)
175 1 12 unless keys %indentdiffs
180 19 8 if $value > $max
183 8 4 if ($maxkey =~ /^s(\d+)$/)
186 3 5 if (defined $mixed and $mixed >= $max * 0.2)
193 6 30 if (not exists $modeline_settings{$key} and exists $modeline_settings{"style_$key"})
199 3 9 if (exists $modeline_settings{'softtabstop'}) { }
1 8 elsif (exists $modeline_settings{'tabstop'}) { }
205 2 10 if (exists $modeline_settings{'usetabs'})
206 2 0 if ($modeline_settings{'usetabs'}) { }
207 1 1 $2 == 8 ? :
0 2 $1 eq 'u' ? :
215 0 12 if ($modeline_settings{'mixedmode'})
235 0 0 if ($diff =~ /^ +$/) { }
0 0 elsif ($diff =~ /^\t+$/) { }
252 102 15 if ($diff =~ /^ +$/) { }
15 0 elsif ($diff =~ /^\t+$/) { }
339 398 6 unless $line =~ /$VimModeLineStart/
341 2 4 if ($line =~ /$VimModelineTypeOne/) { }
4 0 elsif ($line =~ /$VimModelineTypeTwo/) { }
351 0 6 unless @options
355 3 11 if /s(?:ts|ofttabstop)=(\d+)/i
356 4 7 if /t(?:s|abstop)=(\d+)/i
357 4 3 if /((?:no)?)(?:expandtab|et)/i
435 4 33 if ($line =~ /$FirstLineRegexp/)
439 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') { }
444 3 0 if defined $tabmodelookup{$value}
451 1 0 if defined $stylelookup{$value}
500 5 508 if ($$settings{'in_local_variables_section'}) { }
2 506 elsif ($line =~ /^\s*(\S*)\s*Local Variables:\s*(\S*)\s*$/) { }
502 0 5 unless defined $prefix
505 0 5 unless defined $suffix
508 3 2 if ($line =~ /^\s*$prefix\s*([^\s:]+):\s*(.+)$suffix\s*$/) { }
512 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') { }
516 1 0 if defined $tabmodelookup{$value}
522 1 0 if defined $stylelookup{$value}
544 21 0 if $start < 0
557 0 0 if $indent eq 'Text::FindIndent'
558 0 0 if ref $indent or length $indent > 5
561 0 0 if ($indent =~ /^t(\d+)/) { }
0 0 elsif ($indent =~ /^s(\d+)/) { }
0 0 elsif ($indent =~ /^m(\d+)/) { }