Condition Coverage

bin/jq-lite
Criterion Covered Total %
condition 75 142 52.8


and 3 conditions

line !l l&&!r l&&r condition
121 0 1 56 defined $_ && $_ =~ /\S/
127 0 1 55 defined $_ && $_ =~ /\S/
235 4 0 1 @ARGV == 0 and $file_path =~ /^\./
375 0 1 2 defined $file and $file eq "-"
381 0 1 1 defined $file and $file eq "-"
423 7 27 1 not $null_input and -f $ARGV[0]
34 1 0 not $null_input and -f $ARGV[0] and not defined $query
557 0 12 1 not $force_yaml and $filename =~ /\.ya?ml\z/i
569 42 0 1 $force_yaml and not $null_input
573 2 0 0 $decoder_debug and $yaml_module
593 0 0 2 @raw_lines and $raw_lines[-1] eq ""
0 0 2 @raw_lines and $raw_lines[-1] eq "" and $text =~ /\r?\n\z/
599 4 36 3 not $raw_input and $slurp_input
40 1 2 not $raw_input and $slurp_input and not $null_input
601 2 0 0 not $decoded and $@
680 4 7 6 $offset < $length and substr($text, $offset, 1) =~ /\s/
715 2087 0 0 $raw_output and not ref $r
731 38 4 0 $raw_input and not defined $query
754 0 0 0 $ok and @last_results
792 0 0 0 $ok and @results
825 38 2 2 $raw_input and not $slurp_input

or 2 conditions

line l !l condition
36 16 0 $message ||= "invalid usage"
44 2 0 $message ||= "input error"
52 3 0 $message ||= "compile error"
60 3 0 $message ||= "runtime error"
390 1 0 readline $fh // ""
585 4 0 $json_text // ""
652 2 0 shift() // ""
660 0 0 $err ||= "Unknown YAML parsing error"
807 0 0 $@ || 'Unknown error'
831 0 0 $@ || 'Unknown error'
841 3 0 $@ || 'Unknown error'

or 3 conditions

line l !l&&r !l&&!r condition
69 0 0 46 not defined $query or $query eq ""
93 0 3 341 $char eq "'" or $char eq "\""
98 7 12 322 $char eq "(" or $char eq "["
19 0 322 $char eq "(" or $char eq "[" or $char eq "{"
103 7 11 304 $char eq ")" or $char eq "]"
18 0 304 $char eq ")" or $char eq "]" or $char eq "}"
110 0 0 18 not defined $open or $open ne $pairs{$char}
116 0 1 45 defined $string or @stack
227 0 0 5 not defined $var_name or $var_name eq ""
241 0 0 3 not defined $var_name or $var_name eq ""
252 0 0 7 not defined $var_name or $var_name eq ""
270 0 0 3 not defined $var_name or $var_name eq ""
295 0 0 2 not defined $var_name or $var_name eq ""
347 1 0 0 $!{'EPIPE'} or $!{'EINVAL'}
356 2 4 10 $raw_input || $raw_output || $compact_output || $ascii_output || $color_output || defined $decoder_choice || $decoder_debug || $exit_status || $null_input || $slurp_input || $force_yaml || @query_files || keys %arg_vars || @slurpfiles
376 1 0 1 $null_input or @ARGV
518 0 0 4 not defined $var_name or $var_name eq ""
523 0 0 4 not defined $file_path or $file_path eq ""
778 0 0 0 $ord == 127 or $char eq "\b"