Branch Coverage

script/sdif
Criterion Covered Total %
branch 145 294 49.3


line true false branch
117 0 10 if (my $env = $ENV{'SDIFOPTS'})
122 41 0 unless utf8::is_utf8($_)
186 0 0 $_[1] ? :
208 0 0 $_[1] ? :
211 0 0 if ($_[1] =~ /^(?:wide|full)/u)
223 0 10 unless $app = "Getopt::EX::Hashed"->new
229 0 10 unless $app->getopt
231 0 10 if $app->debug
242 0 10 if $app->tabstyle
243 0 10 if ($app->visible->{'ht'})
254 0 0 unless my $char = shift()
255 0 0 if ($char =~ /^\X$/u) { }
258 0 0 unless eval qq["\\N{$char}"]
262 0 10 if ($app->margin > 0)
263 0 0 if ($app->runin and $app->margin < $app->runin)
275 10 0 $app->{'256'} ? :
276 150 50 ref $b eq 'ARRAY' ? :
321 60 0 if $color
327 0 10 if ($app->colordump)
334 5 5 if ($app->color eq 'always' or $app->color eq 'auto' and -t STDOUT) { }
345 5 5 if (defined $app->cdif and $app->cdif eq "")
357 30 10 if ($type eq '!') { }
10 0 elsif ($type eq '=') { }
358 0 30 unless defined $var
359 30 0 if $var == $default
360 0 0 $var ? :
362 10 0 unless defined $var
372 0 10 if (@ARGV == 2) { }
10 0 elsif (@ARGV < 2) { }
397 0 10 unless ($markpos{$app->mark})
414 9 0 if $app->mark
422 1 9 if (defined(my $n = $app->colortable))
431 9 0 !$app->column ? :
441 9 0 if ($app->prefix) { }
448 0 9 if ($app->debug)
454 4 5 if ($app->cdif) { }
456 0 4 if (not defined $pid) { }
0 4 elsif ($pid == 0) { }
457 0 0 unless defined $pid
461 0 0 if ($DIFF ne "-")
462 0 0 unless open STDIN, $DIFF
474 0 5 unless open DIFF, $DIFF
477 0 9 if ($readfile)
482 0 0 unless open DIFF, "<", \$DIFFOUT
484 0 0 unless open OLD, $OLD
485 0 0 unless open NEW, $NEW
488 0 0 unless -p OLD
489 0 0 unless -p NEW
503 5 45 if (/^([\d,]+)([adc])([\d,]+)$/u) { }
1 44 elsif (/^\*\*\* /u) { }
1 43 elsif ($_ eq "***************\n") { }
10 33 elsif (/^($prefix_re)(--- (?s:.*))/u) { }
10 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) { }
508 0 5 if ($readfile)
512 5 0 if ($app->debug or $read_stdin)
515 4 1 if ($ctrl eq "d" or $ctrl eq "c")
519 0 4 if $readfile
521 3 2 if $ctrl eq "c"
522 4 1 if ($ctrl eq "a" or $ctrl eq "c")
526 0 4 if $readfile
544 0 1 unless (($left) = /^\*\*\* ([\d,]+) \*\*\*\*$/u)
552 1 0 unless (($right) = /^--- ([\d,]+) ----$/u)
555 0 1 unless (($right) = /^--- ([\d,]+) ----$/u)
560 2 12 if /^-/u
561 4 10 if /^!/u
565 1 0 if (@old == 0 or $cline != 0 or $oline - $dline != $nline)
582 4 6 if ($prefix)
605 4 6 if ($prefix)
622 0 0 unless (defined $lines[-1])
662 0 0 if (defined $mrg or $app->parallel > 2) { }
663 0 0 if (defined $mrg) { }
699 0 0 $start eq '#ifdef' ? :
708 0 0 unless ($c3 =~ /^$start\h++(.*)/u)
733 0 9 $DIFF =~ /\|$/u ? :
735 0 9 if ($readfile)
736 0 0 if ($exit < 2)
754 0 28 unless s/(?<= ^[ \-\+\!] ) [\t ]//ux
764 6 2 if @n
771 1 5 if @old
774 1 4 if @new
784 0 23 if ($app->parallel > 2) { }
0 23 elsif ($app->parallel > 1) { }
799 0 16 if ($app->view)
806 0 0 $_ ? :
813 0 32 unless s/^(.)//u
825 46 49 $old ? :
826 83 12 $new ? :
830 46 49 if defined $old
831 83 12 if defined $new
834 2 6 if ($max and $one_side and ++$count >= $max and @$o + @$n > 0)
844 2 0 if (@$n) { }
851 0 2 unless @$n
852 2 0 unless @$o
863 0 0 if ($app->view)
871 0 0 $_ ? :
891 0 0 $old ? :
892 0 0 $new ? :
893 0 0 $mrg ? :
897 0 0 if defined $old
898 0 0 if defined $new
899 0 0 if defined $mrg
909 0 0 unless defined $old or defined $new
919 0 0 defined $n ? :
929 0 129 $print_number ? :
930 78 51 if (defined $old)
932 0 78 if $print_number
934 117 12 if (defined $new)
936 0 117 if $print_number
938 0 129 if (defined $mrg)
940 0 0 if $print_number
944 128 1 if (my $max = $app->limit->{'length'})
946 383 1 unless defined $_ and length $_ > $max
956 46 83 $omark =~ /\S/u ? :
958 83 46 $nmark =~ /\S/u ? :
960 0 0 $mmark =~ /\S/u ? :
0 129 if $column >= 3
971 0 135 if $column >= 3
978 0 135 if $print_number
979 135 0 if $o ne ""
981 0 135 if $print_number
982 135 0 if $n ne ""
983 0 135 if ($column >= 3)
985 0 0 if $print_number
986 0 0 if $m ne ""
990 0 135 if $app->truncate
991 129 0 unless $old ne "" or $new ne "" or $mrg and $mrg ne ""
993 0 6 if ($print_number)
996 0 0 if $column >= 3
998 0 6 $old ne '' ? :
999 6 0 $new ne '' ? :
1000 0 0 $mrg ne '' ? :
0 6 if $column >= 3
1005 21 6 ref $_[0] ? :
1012 16 11 if $opt->{'type'} eq "COMMAND"
1013 11 16 if $opt->{'type'} eq "FILE"
1019 54 0 if defined $_
1022 54 0 $i < @color ? :
1032 0 162 if (@column >= @_)
1036 324 0 $i < @markpos ? :
1038 162 162 if $markpos eq "left"
1039 0 324 if $_ = $f->{'LINE'}
1040 324 0 if $_ = $f->{'TEXT'}
1041 162 162 if $markpos eq "right"