Condition Coverage

lib/ChordPro.pm
Criterion Covered Total %
condition 33 127 25.9


and 3 conditions

line !l l&&!r l&&r condition
128 0 0 91 defined $of and $of ne ""
167 0 0 0 $main::options->{'dump-chords'} and not @ARGV
185 91 0 0 $main::options->{'verbose'} and $pkg->can("version")
221 0 72 0 &Getopt::Long::GetOptionsFromArray(\@w, \%opts, "config=s\@", \@cfg, "meta=s%", \%meta, "define=s%", \%defs, "title=s", "subtitle=s", "dir:s", "filelist:s") and @w == 1 && !keys(%opts) || @w == 0 && keys %opts
240 0 0 0 @ARGV > 1 and not $file =~ /^--/u
245 72 0 0 defined $gopts{'dir'} and not fn_is_absolute($file)
271 0 0 0 $c =~ /^(.[b#]?)/u and $1 ne $prev
291 0 0 0 @{$s->{'songs'};} == 1 and not exists $s->{'songs'}[0]{'body'}
318 0 8 71 $res and @$res > 0
319 0 0 71 $of and $of ne "-"
1005 0 0 0 $try and fs_test("r", $try)

or 2 conditions

line l !l condition
130 0 8 $main::options->{'generate'} ||= "PDF"
133 0 0 $main::options->{'generate'} ||= "LilyPond"
136 0 0 $main::options->{'generate'} ||= "LaTeX"
139 0 6 $main::options->{'generate'} ||= "ChordPro"
142 0 0 $main::options->{'generate'} ||= "ChordPro"
146 0 9 $main::options->{'generate'} ||= "Text"
149 0 3 $main::options->{'generate'} ||= "HTML"
152 0 0 $main::options->{'generate'} ||= "MMA"
155 0 0 $main::options->{'generate'} ||= "Markdown"
158 0 0 $main::options->{'generate'} ||= "Meta"
161 0 0 $main::options->{'generate'} ||= "Debug"
180 91 0 $main::options->{'generate'} ||= "PDF"
957 0 0 $clo->{'progress_callback'} //= "warn"
1150 8 9 shift() // "normal"
1161 0 0 $_->{'type'} // "core"
1165 17 0 $_->{'type'} // "core"
1203 0 9 $i{'general'}{'fontdir'} // []
1242 17 0 shift() // "normal"
1377 9 0 $main::config->{'metadata'}{'keys'} // []
1399 0 0 $configs{$_} || 'no default'

or 3 conditions

line l !l&&r !l&&!r condition
167 0 0 0 @ARGV > 1 or $main::options->{'dump-chords'} and not @ARGV
214 0 0 72 $file =~ /(^|\s)--\w+/u or $file =~ /^["']/u
221 72 0 0 @w == 1 && !keys(%opts) || @w == 0 && keys %opts
955 0 0 91 $clo->{'trace'} ||= $clo->{'debug'}
956 0 0 91 $clo->{'verbose'} ||= $clo->{'trace'}
974 0 0 91 $ident or $clo->{'verbose'}
0 0 91 $ident or $clo->{'verbose'} or $help
0 0 91 $ident or $clo->{'verbose'} or $help or $manual
975 0 0 91 $manual or $help
1021 0 91 0 $clo->{'nosongconfig'} ||= $clo->{'nodefaultconfigs'}
1039 0 0 91 $tmplcfg or $defcfg
1047 0 0 91 $fincfg or $deltacfg
1081 0 0 0 $options->{'front-matter'} //= $files[0]
1085 0 0 0 $options->{'back-matter'} //= $files[-1]
1097 0 0 91 $main::__EMBEDDED__ or $clo->{'dump-chords'}
0 0 91 $main::__EMBEDDED__ or $clo->{'dump-chords'} or $clo->{'convert-config'}
0 91 0 $main::__EMBEDDED__ or $clo->{'dump-chords'} or $clo->{'convert-config'} or @ARGV
1290 9 0 0 eval { do { require ChordPro::Delegate::ABC; my $x = "ChordPro::Delegate::ABC"->info; $res->{'general'}{'abc'} = $x->{'info'} if $x->{'info'}; 1 } } or $@ =~ /Can't locate/u