Branch Coverage

script/sdif
Criterion Covered Total %
branch 128 282 45.3


line true false branch
116 0 5 if (my $env = $ENV{'SDIFOPTS'})
121 9 0 unless utf8::is_utf8($_)
184 0 0 $_[1] ? :
206 0 0 $_[1] ? :
209 0 0 if ($_[1] =~ /^(?:wide|full)/u)
221 0 5 unless $app = "Getopt::EX::Hashed"->new
227 0 5 unless $app->getopt
229 0 5 if $app->debug
240 0 5 if $app->tabstyle
241 0 5 if ($app->visible->{'ht'})
252 0 0 unless my $char = shift()
253 0 0 if ($char =~ /^\X$/u) { }
256 0 0 unless eval qq["\\N{$char}"]
260 0 5 if ($app->margin > 0)
261 0 0 if ($app->runin and $app->margin < $app->runin)
273 5 0 $app->{'256'} ? :
274 75 20 ref $b eq 'ARRAY' ? :
318 30 0 if $color
324 0 5 if ($app->colordump)
331 5 0 if ($app->color eq 'always' or $app->color eq 'auto' and -t STDOUT) { }
342 5 0 if (defined $app->cdif and $app->cdif eq "")
354 15 5 if ($type eq '!') { }
5 0 elsif ($type eq '=') { }
355 0 15 unless defined $var
356 15 0 if $var == $default
357 0 0 $var ? :
359 5 0 unless defined $var
369 0 5 if (@ARGV == 2) { }
5 0 elsif (@ARGV < 2) { }
394 0 5 unless ($markpos{$app->mark})
411 4 0 if $app->mark
419 1 4 if (defined(my $n = $app->colortable))
428 4 0 !$app->column ? :
438 4 0 if ($app->prefix) { }
445 0 4 if ($app->debug)
451 4 0 if ($app->cdif) { }
453 0 4 if (not defined $pid) { }
0 4 elsif ($pid == 0) { }
454 0 0 unless defined $pid
458 0 0 if ($DIFF ne "-")
459 0 0 unless open STDIN, $DIFF
471 0 0 unless open DIFF, $DIFF
474 0 4 if ($readfile)
479 0 0 unless open DIFF, "<", \$DIFFOUT
481 0 0 unless open OLD, $OLD
482 0 0 unless open NEW, $NEW
485 0 0 unless -p OLD
486 0 0 unless -p NEW
500 5 35 if (/^([\d,]+)([adc])([\d,]+)$/u) { }
1 34 elsif (/^\*\*\* /u) { }
1 33 elsif ($_ eq "***************\n") { }
5 28 elsif (/^($prefix_re)(--- (?s:.*))/u) { }
5 23 elsif (/^ (?$prefix_re) (? \@\@ [ ] \-(?\d+) (?:,(?\d+))? [ ] \+(?\d+) (?:,(?\d+))? [ ] \@\@ (?s:.*) ) /ux) { }
0 23 elsif (/^diff --(?:cc|combined)/u) { }
0 23 elsif (/^\@{3} -(\d+)(?:,(\d+))? -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? \@{3}/u) { }
0 23 elsif (/^<<<<<<<\h*+(.*)/u) { }
0 23 elsif (/^(\#ifdef|:{7,})\h++(.*)/u) { }
505 0 5 if ($readfile)
509 5 0 if ($app->debug or $read_stdin)
512 4 1 if ($ctrl eq "d" or $ctrl eq "c")
516 0 4 if $readfile
518 3 2 if $ctrl eq "c"
519 4 1 if ($ctrl eq "a" or $ctrl eq "c")
523 0 4 if $readfile
541 0 1 unless (($left) = /^\*\*\* ([\d,]+) \*\*\*\*$/u)
549 1 0 unless (($right) = /^--- ([\d,]+) ----$/u)
552 0 1 unless (($right) = /^--- ([\d,]+) ----$/u)
557 2 12 if /^-/u
558 4 10 if /^!/u
562 1 0 if (@old == 0 or $cline != 0 or $oline - $dline != $nline)
579 4 1 if ($prefix)
602 4 1 if ($prefix)
619 0 0 unless (defined $lines[-1])
659 0 0 if (defined $mrg or $app->parallel > 2) { }
660 0 0 if (defined $mrg) { }
696 0 0 $start eq '#ifdef' ? :
705 0 0 unless ($c3 =~ /^$start\h++(.*)/u)
730 0 4 $DIFF =~ /\|$/u ? :
732 0 4 if ($readfile)
733 0 0 if ($exit < 2)
751 0 28 unless s/(?<= ^[ \-\+\!] ) [\t ]//ux
761 6 2 if @n
768 1 5 if @old
771 1 4 if @new
781 0 23 if ($app->parallel > 2) { }
0 23 elsif ($app->parallel > 1) { }
796 0 11 if ($app->view)
803 0 0 $_ ? :
810 0 32 unless s/^(.)//u
819 26 39 $old ? :
820 53 12 $new ? :
824 26 39 if defined $old
825 53 12 if defined $new
834 0 0 if ($app->view)
842 0 0 $_ ? :
862 0 0 $old ? :
863 0 0 $new ? :
864 0 0 $mrg ? :
868 0 0 if defined $old
869 0 0 if defined $new
870 0 0 if defined $mrg
880 0 0 unless defined $old or defined $new
890 0 0 defined $n ? :
900 0 97 $print_number ? :
901 58 39 if (defined $old)
903 0 58 if $print_number
905 85 12 if (defined $new)
907 0 85 if $print_number
909 0 97 if (defined $mrg)
911 0 0 if $print_number
914 26 71 $omark =~ /\S/u ? :
916 53 44 $nmark =~ /\S/u ? :
918 0 0 $mmark =~ /\S/u ? :
0 97 if $column >= 3
929 0 97 if $column >= 3
936 0 97 if $print_number
937 97 0 if $o ne ""
939 0 97 if $print_number
940 97 0 if $n ne ""
941 0 97 if ($column >= 3)
943 0 0 if $print_number
944 0 0 if $m ne ""
948 0 97 if $app->truncate
949 97 0 unless $old ne "" or $new ne "" or $mrg and $mrg ne ""
951 0 0 if ($print_number)
954 0 0 if $column >= 3
956 0 0 $old ne '' ? :
957 0 0 $new ne '' ? :
958 0 0 $mrg ne '' ? :
0 0 if $column >= 3
963 11 6 ref $_[0] ? :
970 11 6 if $opt->{'type'} eq "COMMAND"
971 6 11 if $opt->{'type'} eq "FILE"
977 34 0 if defined $_
980 34 0 $i < @color ? :
990 0 114 if (@column >= @_)
994 228 0 $i < @markpos ? :
996 114 114 if $markpos eq "left"
997 0 228 if $_ = $f->{'LINE'}
998 228 0 if $_ = $f->{'TEXT'}
999 114 114 if $markpos eq "right"