Condition Coverage

blib/lib/Perl/Tidy.pm
Criterion Covered Total %
condition 85 249 34.1


and 2 conditions

line l !l condition
4094 557 0 not $ok and 0
4344 557 0 not $ok and 0
4915 0 0 not $ok and 0

and 3 conditions

line !l l&&!r l&&r condition
725 0 0 0 $dump_options_type ne "perltidyrc" and $dump_options_type ne "full"
889 559 0 0 $rOpts->{'dump-block-summary'} and $num_files != 1
946 559 0 0 $in_place_modify and $backup_extension
999 559 0 0 @Arg_files > 1 and $rOpts->{'file-size-order'}
1107 557 0 2 $rOpts->{'backup-and-modify-in-place'} && $rOpts->{'format'} eq 'tidy'
1158 0 559 0 defined $backup_method and $backup_method ne "copy"
559 0 0 defined $backup_method and $backup_method ne "copy" and $backup_method ne "move"
1257 0 0 0 not $self->[24] and defined $write_time
1268 0 0 0 $delete_backup and -f $backup_file
1272 0 0 0 $delete_backup > 1 and $self->[14]->get_warning_count
1284 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
1396 0 0 0 not $self->[24] and defined $write_time
1407 0 0 0 $delete_backup and -f $backup_name
1411 0 0 0 $delete_backup > 1 and $self->[14]->get_warning_count
1423 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
1460 2 0 0 $in_place_modify and chown $uid_i, $gid_i, $output_file
1576 546 2 0 $decoder and ref $decoder
1578 0 0 0 $encoding_in ne "UTF-8" and $encoding_in ne "utf8"
1816 552 4 0 $input_line_separator ne "\n" and $input_line_separator eq $CR
1977 3 0 0 $in_place_modify and not -w $input_file
1979 0 0 0 defined $backup_method and $backup_method eq "copy"
2021 556 3 0 not $source_stream and $input_file =~ /$forbidden_file_extensions/ || $input_file eq 'DIAGNOSTICS'
2093 0 0 0 @input_file_stat and $output_file eq $input_file
2200 1 0 558 $rOpts->{'format'} eq "tidy" and defined $routput_string
2258 0 0 0 defined $backup_method and $backup_method eq "copy"
2317 0 0 4 $output_file and -f $output_file
0 0 4 $output_file and -f $output_file and not -l $output_file
2655 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 "-"
2747 556 0 5 $max_iterations > 1 and not defined $iteration_of_formatter_convergence
556 0 5 $max_iterations > 1 and not defined $iteration_of_formatter_convergence and $formatter->can("get_convergence_check")
2815 1 0 0 $diagnostics_object and $iterm > 2
2855 558 1 0 $fh_tee and $fh_tee->can("close")
559 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 "-"
2933 0 547 6 $rOpts->{'encode-output-strings'} && $self->[2]
3014 0 0 0 defined $s1 and defined $s2
3042 0 0 0 $leni and $leno
3068 0 0 0 defined $linei and defined $lineo
4205 557 0 0 $saw_dump_profile and $saw_ignore_profile
4432 0 0 3 defined $input_string and length $input_string
4537 558 0 1 defined $rOpts->{'logfile-gap'} and $rOpts->{'logfile-gap'} >= 0
4616 556 0 3 defined $rOpts->{'sub-alias-list'} and length $rOpts->{'sub-alias-list'}
4690 0 1 0 defined $n2 and $n2 < $n1
4958 0 0 0 $os eq '2000' && $major != 5
5202 0 0 0 $body and $body =~ s/\}$//

or 3 conditions

line l !l&&r !l&&!r condition
271 549 0 0 $ref || $filename
1117 0 2 0 $rOpts->{'standard-output'} or $destination_stream
2 0 0 $rOpts->{'standard-output'} or $destination_stream or ref $source_stream
2 0 0 $rOpts->{'standard-output'} or $destination_stream or ref $source_stream or $rOpts->{'outfile'}
0 0 0 $rOpts->{'standard-output'} or $destination_stream or ref $source_stream or $rOpts->{'outfile'} or defined $rOpts->{'output-path'}
1455 2 0 0 $uid_i != $uid_o or $gid_i != $gid_o
1545 0 0 557 not $rOpts_character_encoding or $rOpts_character_encoding eq "none"
1968 3 0 0 -T $input_file or $rOpts->{'force-read-binary'}
2021 0 0 3 $input_file =~ /$forbidden_file_extensions/ || $input_file eq 'DIAGNOSTICS'
2412 0 0 1 not defined $line_tidy_end or $line_tidy_end > $num
2427 0 0 558 $rOpts->{'assert-tidy'} or $rOpts->{'assert-untidy'}
0 2 556 $rOpts->{'assert-tidy'} or $rOpts->{'assert-untidy'} or $rOpts->{'backup-and-modify-in-place'}
2438 557 0 1 $rOpts->{'add-terminal-newline'} || substr(${$rinput_string;}, -1, 1) =~ /\n/
2507 1 0 557 @input_lines_pre or @input_lines_post
2575 2 0 0 $self->[1] || $fileroot . $self->make_file_extension('DEBUG')
2584 1 0 558 $rOpts->{'tee-pod'} or $rOpts->{'tee-block-comments'}
0 0 558 $rOpts->{'tee-pod'} or $rOpts->{'tee-block-comments'} or $rOpts->{'tee-side-comments'}
2588 1 0 0 $self->[21] || $fileroot . $self->make_file_extension('TEE')
2610 0 0 558 not defined $max_iterations or $max_iterations <= 0
2765 0 0 4 $stop_now ||= $tokenizer->get_unexpected_error_count
2777 0 2 2 $stop_now ||= defined $iteration_of_formatter_convergence
2800 0 0 0 $stopping_on_error ||= $convergence_log_message
2928 550 3 0 $ref_destination_stream eq "SCALAR" or $ref_destination_stream eq "ARRAY"
3169 2 0 557 $rOpts->{'DEBUG'} or $rOpts->{'show-options'}
4057 552 0 7 defined $perltidyrc_stream || $dump_options_type
4402 14 0 3915 $seen{$word} or $is_excluded_word{$word}
4448 0 0 11 $word =~ /^\d/ or not $word =~ /^\w[\w\d]*$/
4544 544 12 3 $rOpts->{'add-whitespace'} or $rOpts->{'delete-old-whitespace'}
12 0 3 $rOpts->{'add-whitespace'} or $rOpts->{'delete-old-whitespace'} or $rOpts->{'add-newlines'}
0 0 3 $rOpts->{'add-whitespace'} or $rOpts->{'delete-old-whitespace'} or $rOpts->{'add-newlines'} or $rOpts->{'delete-old-newlines'}
4634 0 0 6 $rOpts->{'maximum-line-length'} != 1 or $rOpts->{'continuation-indentation'} != 0
4649 544 12 3 $rOpts->{'add-whitespace'} || $rOpts->{'delete-old-whitespace'}