Condition Coverage

blib/lib/Perl/Tidy.pm
Criterion Covered Total %
condition 117 351 33.3


and 2 conditions

line l !l condition
4720 645 0 not $ok and 0
5039 645 0 not $ok and 0
5865 0 0 not $ok and 0

and 3 conditions

line !l l&&!r l&&r condition
387 0 0 0 $timeout_in_seconds and $timeout_in_seconds > 0
473 0 0 0 length $nag_message and $Warn_count > 0
653 0 0 0 $rexceptions and $rexceptions->{$word}
666 4610 0 0 $rexceptions and $rexceptions->{$word}
667 0 0 4610 $word =~ /^\w+$/ and not $word =~ /^\d/
670 0 0 0 $allow_module_path and index $word, ":"
675 0 0 0 $sub_word =~ /^\w+$/ and not $sub_word =~ /^\d/
954 0 0 0 $dump_options_type ne "perltidyrc" and $dump_options_type ne "full"
1198 646 0 1 $rOpts->{'line-range-tidy'} && ($self->[13] > 1 || defined $self->[14])
1220 0 638 9 not $num_files and @ARGV_saved > 1
1223 0 9 0 $opt_test =~ s/^[-]+// and not $file_test =~ /^[-]/
9 0 0 $opt_test =~ s/^[-]+// and not $file_test =~ /^[-]/ and not $file_test =~ /^\d+$/
9 0 0 $opt_test =~ s/^[-]+// and not $file_test =~ /^[-]/ and not $file_test =~ /^\d+$/ and -e $file_test
1241 0 0 0 $long_name and defined $rOpts->{$long_name}
0 0 0 $long_name and defined $rOpts->{$long_name} and $rOpts->{$long_name} eq $file_test
0 0 0 $long_name and defined $rOpts->{$long_name} and $rOpts->{$long_name} eq $file_test and not $is_option_with_file_parameter{$long_name}
1262 647 0 0 $in_place_modify and $backup_extension
1353 647 0 0 @Arg_files > 1 and $rOpts->{'file-size-order'}
1465 645 0 2 $rOpts->{'backup-and-modify-in-place'} && $rOpts->{'format'} eq 'tidy'
1542 0 647 0 defined $backup_method and $backup_method ne "copy"
647 0 0 defined $backup_method and $backup_method ne "copy" and $backup_method ne "move"
1640 0 0 0 not $self->[25] and defined $write_time
1651 0 0 0 $delete_backup and -f $backup_file
1655 0 0 0 $delete_backup > 1 and $self->[15]->get_warning_count
1667 0 0 0 not -s $input_file and -s $backup_file
0 0 0 not -s $input_file and -s $backup_file and $delete_backup == 1
1778 0 0 0 not $self->[25] and defined $write_time
1789 0 0 0 $delete_backup and -f $backup_name
1793 0 0 0 $delete_backup > 1 and $self->[15]->get_warning_count
1805 0 0 0 not -s $input_file and -s $backup_name
0 0 0 not -s $input_file and -s $backup_name and $delete_backup == 1
1850 2 0 0 $in_place_modify and chown $uid_i, $gid_i, $output_file
1997 634 2 0 $decoder and ref $decoder
1999 0 0 0 $encoding_in ne "UTF-8" and $encoding_in ne "utf8"
2243 0 0 4 $input_line_separator eq $CRLF and "\n" eq $LF
2392 3 0 0 $in_place_modify and not -w $input_file
2394 0 0 0 defined $backup_method and $backup_method eq "copy"
2437 644 3 0 not $source_stream and $input_file =~ /$forbidden_file_extensions/ || $input_file eq 'DIAGNOSTICS'
2465 0 0 0 $number_of_files > 0 && !$line_range_clipped
2488 647 0 0 defined $output_file and length $output_file
2522 0 0 0 @input_file_stat and $output_file eq $input_file
2568 636 11 0 $is_encoded_data and $self->[26]
2630 1 0 646 $rOpts->{'format'} eq "tidy" and defined $routput_string
2685 0 0 0 defined $backup_method and $backup_method eq "copy"
2744 0 0 4 $output_file and -f $output_file
0 0 4 $output_file and -f $output_file and not -l $output_file
3088 2 0 0 $fh_tee and $fh_tee->can("close")
2 0 0 $fh_tee and $fh_tee->can("close") and not ref $tee_file
0 0 0 $fh_tee and $fh_tee->can("close") and not ref $tee_file and $tee_file ne "-"
3173 644 0 5 $max_iterations > 1 and not defined $iteration_of_formatter_convergence
644 0 5 $max_iterations > 1 and not defined $iteration_of_formatter_convergence and $formatter->can("get_convergence_check")
3206 1 0 0 $iter == 1 and not $stop_now
1 0 0 $iter == 1 and not $stop_now and $formatter->can("want_second_iteration")
0 0 0 $iter == 1 and not $stop_now and $formatter->can("want_second_iteration") and $formatter->want_second_iteration
3253 1 0 0 $diagnostics_object and $iterm > 2
3300 646 1 0 $fh_tee and $fh_tee->can("close")
647 0 0 $fh_tee and $fh_tee->can("close") and not ref $tee_file
1 0 0 $fh_tee and $fh_tee->can("close") and not ref $tee_file and $tee_file ne "-"
3379 0 635 6 $rOpts->{'encode-output-strings'} && $self->[2]
3460 0 0 0 defined $s1 and defined $s2
3512 0 0 0 $leni and $leno
3528 0 0 0 @aryi and @aryo
4846 645 0 0 $saw_dump_profile and $saw_ignore_profile
5141 0 0 3 defined $input_string and length $input_string
5223 4012 0 0 $leading_dash_check{$opt_name} and substr($test_string, 0, 1) eq "-"
5236 3365 647 0 $leading_space_check{$opt_name} and $test_string =~ /^\s/
5241 3365 647 0 $trailing_space_check{$opt_name} and $test_string =~ /\s$/
5305 0 43351 0 defined $min and $val < $min
5314 20059 23292 0 defined $max and $val > $max
5404 646 0 1 defined $rOpts->{'logfile-gap'} and $rOpts->{'logfile-gap'} >= 0
5486 644 0 3 defined $rOpts->{'sub-alias-list'} and length $rOpts->{'sub-alias-list'}
5550 0 1 0 defined $n2 and $n2 < $n1
5750 7 0 1203 substr($arg, 0, 2) eq "--" and length $arg > 2
5753 1203 0 0 $arg_seeking_string_last and $arg =~ /^\-\-[A-Za-z]/
5760 649 554 0 index($arg, "=") == -1 and $$ris_string_option{substr $arg, 2}
5908 0 0 0 $os eq '2000' && $major != 5
6156 0 1 3 $line and $line =~ /^\s*---(\w[\w-]*)/
6163 2 1 0 not $is_known and $word =~ s/^no-?//
6234 0 0 0 $body and $body =~ s/\}$//

or 3 conditions

line l !l&&r !l&&!r condition
688 0 0 0 $on_error eq "warn" or $on_error eq "die"
1475 2 0 0 $destination_stream or not defined $source
2 0 0 $destination_stream or not defined $source or ref $source
0 0 0 $destination_stream or not defined $source or ref $source or $source eq "-"
0 0 0 $destination_stream or not defined $source or ref $source or $source eq "-" or $rOpts->{'outfile'}
0 0 0 $destination_stream or not defined $source or ref $source or $source eq "-" or $rOpts->{'outfile'} or defined $rOpts->{'output-path'}
1845 2 0 0 $uid_i != $uid_o or $gid_i != $gid_o
1966 0 0 645 not $rOpts_character_encoding or $rOpts_character_encoding eq "none"
2383 3 0 0 -T $input_file or $rOpts->{'force-read-binary'}
2437 0 0 3 $input_file =~ /$forbidden_file_extensions/ || $input_file eq 'DIAGNOSTICS'
2838 0 0 1 not defined $line_tidy_end or $line_tidy_end > $num
2853 0 0 646 $rOpts->{'assert-tidy'} or $rOpts->{'assert-untidy'}
0 2 644 $rOpts->{'assert-tidy'} or $rOpts->{'assert-untidy'} or $rOpts->{'backup-and-modify-in-place'}
2864 645 0 1 $rOpts->{'add-terminal-newline'} || substr(${$rinput_string;}, -1, 1) =~ /\n/
2933 1 0 645 @input_lines_pre or @input_lines_post
3009 2 0 0 $self->[1] || $fileroot . $self->make_file_extension('DEBUG')
3018 1 0 646 $rOpts->{'tee-pod'} or $rOpts->{'tee-block-comments'}
0 0 646 $rOpts->{'tee-pod'} or $rOpts->{'tee-block-comments'} or $rOpts->{'tee-side-comments'}
3022 1 0 0 $self->[22] || $fileroot . $self->make_file_extension('TEE')
3043 0 0 646 not defined $max_iterations or $max_iterations <= 0
3191 0 0 4 $stop_now ||= $tokenizer->get_unexpected_error_count
3203 0 2 2 $stop_now ||= defined $iteration_of_formatter_convergence
3238 0 0 0 $stopping_on_error ||= $convergence_log_message
3374 638 3 0 $ref_destination_stream eq "SCALAR" or $ref_destination_stream eq "ARRAY"
4679 640 0 7 defined $perltidyrc_stream || $dump_options_type
5101 14 0 4531 $seen{$word} or $is_excluded_word{$word}
5227 0 0 0 $opt_name eq "outfile" or $opt_name eq "output_path"
5289 0 0 647 not defined $integer_range_check or $integer_range_check <= 0
0 0 647 not defined $integer_range_check or $integer_range_check <= 0 or $integer_range_check > 3
5411 631 12 4 $rOpts->{'add-whitespace'} or $rOpts->{'delete-old-whitespace'}
12 1 3 $rOpts->{'add-whitespace'} or $rOpts->{'delete-old-whitespace'} or $rOpts->{'add-newlines'}
1 0 3 $rOpts->{'add-whitespace'} or $rOpts->{'delete-old-whitespace'} or $rOpts->{'add-newlines'} or $rOpts->{'delete-old-newlines'}
5504 0 0 6 $rOpts->{'maximum-line-length'} != 1 or $rOpts->{'continuation-indentation'} != 0
5519 631 12 4 $rOpts->{'add-whitespace'} || $rOpts->{'delete-old-whitespace'}
6160 1 1 1 $roption_category->{$word} || $rexpansion->{$word}
6379 0 32 0 not length $out_string or $out_string =~ s/\s+$//