Condition Coverage

blib/lib/Perl6/Form.pm
Criterion Covered Total %
condition 89 332 26.8


and 2 conditions

line l !l condition
251 0 0 push @bad, "Unknown option: $opt=>'$new->{$opt}" and next
377 0 0 $_[0] = ' ' x $val{'width'} and return

and 3 conditions

line !l l&&!r l&&r condition
7 0 0 0 not ref $_ and /^[:\$&%\@]?(\w+)$/
0 0 0 not ref $_ and /^[:\$&%\@]?(\w+)$/ and exists $EXPORT{$1} || exists $EXPORT_TAGS{$1}
65 0 0 0 int $_[0] eq $_[0] and $_[0] > 0
85 0 0 0 not $type and $vals eq 'minimal'
94 0 0 0 ref $vals eq 'HASH' and not grep({int $vals->{$_} ne $vals->{$_};} 'min', 'max')
254 0 0 0 @bad and $croak
305 0 0 0 $rem > 0 and $str =~ s/( +)/($rem-- > 0 ? ' ' : '') . $1;/eg
365 22 0 0 $checkplaces and $places != $checkplaces
405 0 22 0 $group and $w =~ s/(?
410 0 18 2 not $val{'stretch'} and ($w ? length $w : 0) + length($pre) > $whole
417 4 0 14 $integral and $str < 0
563 0 22 0 !$form{'isbullet'} && $fld =~ s/[+]//
564 22 0 0 $fld =~ /["']/ and not $fld =~ /[][><]/
577 0 0 0 $checkwidth =~ s/[.,](\d+)// && $1
590 6 16 0 $setwidth and $checkwidth
592 6 8 8 $setwidth and $setwidth =~ s/[.,](\d+)//
597 28 8 8 defined $_->[0] and defined $_->[1]
36 0 8 defined $_->[0] and defined $_->[1] and $_->[0] ne '*'
8 8 0 defined $_->[0] and defined $_->[1] and $_->[0] ne '*' and $_->[0] <= $_->[1]
627 6 0 16 defined $setwidth and $setwidth ne '*'
645 6 0 16 defined $setwidth and $setwidth ne '*'
649 6 16 0 $setwidth and $setwidth eq '*'
684 22 0 0 defined $checkwidth and $form{'width'} != $checkwidth
799 0 0 0 $tabular and $bulleted
0 0 0 $tabular and $bulleted and @col
804 44 22 0 $text eq '' and $more
66 0 0 $text eq '' and $more and (pos ${$str_ref;} // -1) == $prev_pos
817 66 0 0 $bullet and $text =~ /\S/
823 44 22 0 defined $f->{'opts'}{'height'}{'max'} and @col == $f->{'opts'}{'height'}{'max'}
828 0 44 22 @col == 1 and $col[0] eq ''
829 0 0 0 $more && !$f->{'done'}
897 0 0 0 $right >= $prevleft and $left <= $prevright
900 0 0 0 $prev->{'overflow'} and $prev->{'src'} == $fld->{'src'}
964 0 0 0 $row < $maxheight and grep {$_;} values %incomplete
972 0 0 0 $f->{'line'} and $row > 0
979 0 0 0 not $f->{'literal'} and $row + 1 >= ($f->{'opts'}{'height'}{'max'} || $maxheight)
986 0 0 0 $f->{'line'} and $row > 0
993 0 0 0 not $f->{'literal'} and $row + 1 >= ($f->{'opts'}{'height'}{'max'} || $maxheight)
1015 0 0 0 $finished &&= !$tabular_more
1160 44 0 0 length $_ and s/\n?\z/\n/
1167 0 0 22 not $more and $section == $section[-1]
1174 44 0 0 length $_ and s/\n?\z/\n/
1195 0 22 0 $section == $section[-1] and $pagetype ne 'last'
1209 0 22 22 @text < $bodylen and @{$section->{'formatters'};}
1218 22 44 0 @$_ and not length $_->[-1]
1330 0 0 0 $rem > 0 and (pos $_ || 0) < length $_
1331 0 0 0 $ws and /\G ($ws) $wsnzw/cgx
0 0 0 $rem >= $hylen and /\G $lit_hy /cgx

or 2 conditions

line l !l condition
7 0 2 $EXPORT_TAGS{'MANDATORY'} ||= []
52 0 0 $std_one{$_} || '{[{1}[}'
89 0 0 $vals->{'min'} ||= 0
195 0 0 $opts->{'field'}{'from'} ||= []
196 0 0 $opts->{'field'}{'to'} ||= []
455 0 22 $column->[0] || ''
526 22 0 pos $format || 0
593 7 1 $1 || 0
706 0 0 $argcache->{$_} ||= \$s
794 0 44 $skipped ||= 0
802 44 22 pos ${$str_ref;} // -1
804 0 0 pos ${$str_ref;} // -1
842 0 0 pos $$src || 0
939 0 0 $f->{'formcol'} || $f->{'bullets'} || []
959 0 0 $f->{'bullets'} || []
967 0 0 $parts->[$col] ||= []
1043 0 0 $minimaxheight || 0
1048 22 44 pos $$text || 0
1060 0 0 pos ${$$f{'src'};} || 0
1091 22 0 $caller_opts{join $;, $package, $file} ||= {}
1094 22 0 $caller_opts->{$line} || {}
1164 22 0 $page->{'body'}{$pagetype} || $page->{'body'}{$parity} || $page->{'body'}{'other'} || \&std_body
1219 0 66 $formatters->[$col]{'opts'}{'height'}{'min'} || 0
1225 0 66 $f->{'height'}{'min'} || 0
1298 0 0 pop @$src || ''
1330 0 0 pos $_ || 0

or 3 conditions

line l !l&&r !l&&!r condition
7 0 0 0 exists $EXPORT{$1} || exists $EXPORT_TAGS{$1}
19 0 0 0 not defined $_[0] or length $_[0] == 0
34 0 0 0 ref $newval || "'${newval}'"
185 0 0 0 $type || "'${spec}'"
334 0 22 0 $incurr ||= qr/(?!)/
339 0 0 7 $comma_count > 1 && !($period_count || $apost_count) || $period_count > 1 && !($comma_count || $apost_count) || $apost_count > 1 && !($comma_count || $period_count)
380 0 0 22 not $orig =~ /^\s*-/ or $orig == -$orig
410 2 2 18 length $w > $width or not $val{'stretch'} and ($w ? length $w : 0) + length($pre) > $whole
418 2 0 12 $pre =~ /[(]/ or $post =~ /[)]/
513 0 22 0 join('|', @{$opts->{'field'}{'from'};}) || qr/(?!)/
514 0 22 0 join('|', map(quotemeta($_), @{$$opts{'bullet'};})) || qr/(?!)/
590 0 0 22 $extras or $setwidth and $checkwidth
656 0 0 22 $form{'isbullet'} or $fld =~ /[][IV"]/
671 0 22 0 $form{'hjust'} ||= $form{'width'} == 1 ? \&jsingle : ($fld =~ /^(?:<+|\[+)$/ ? \&jleft : ($fld =~ /^(?:>+|\]+)$/ ? \&jright : ($fld =~ /^(?:I+|\|+|>+<+|\]+\[+)$/ ? \&jcentre : ($fld =~ /^(?:<+>+|\[+\]+)$/ ? \&jfull : ($fld =~ /^(?:V+)$/ ? &joverflow(\%form, \%fldopts) : ($fld =~ /^(?: [>,' 0]* \. [<0]* | [],' 0]* \. [[0]* | [>.' 0]* \, [<0]* | [].' 0]* \, [[0]* | [>.,' 0]* \Q$incurr\E [<0]* | [].,' 0]* \Q$incurr\E [[0]* | [].' 0]* \, [[0]* )$/x ? do { $form{'break'} = \&break_nl; jnum($fld, $precurr, $incurr, $postcurr, $form{'width'}, \%fldopts, $setplaces, $checkplaces) } : fatal("Field $fldcnt is of unknown type: $field")))))))
708 0 22 0 &readonly($_) || !$form{'trackpos'}
0 22 0 $form{'src'} ||= ref $_ eq 'ARRAY' ? do { my $s = join('', map({my $val = $_; $val =~ s/\n(?!\z)/\r/g; $val;} map({!defined($_) ? "\n" : (/\n\z/ ? $_ : "$_\n");} @$_))); $form{'trackpos'} ? $argcache->{$_} ||= \$s : \$s } : (&readonly($_) || !$form{'trackpos'} ? \(my $s = $_) : \$_)
712 0 0 0 $fldopts{'break'} || $opts->{'break'}
22 0 0 $form{'break'} ||= $fldopts{'break'} || $opts->{'break'}
723 0 0 22 @starred or @vstarred
792 0 22 44 $f->{'isbullet'} or $f->{'width'} == 1
22 0 44 $f->{'isbullet'} or $f->{'width'} == 1 or $f->{'verbatim'}
824 66 0 0 not $more or @col == $maxheight
869 44 0 0 $_->{'line'} || $_->{'literal'} || $_->{'notlastoverflow'}
879 66 0 0 not $_->{'overflow'} or $_->{'notlastoverflow'}
928 44 22 0 $_->{'literal'} || $_->{'line'}
934 44 0 22 $_->{'literal'} || $_->{'opts'}{'height'}{'minimal'}
945 0 0 0 $f->{'isbullet'} or $f->{'opts'}{'height'}{'minimal'}
953 0 0 0 $f->{'isbullet'} or not $f->{'opts'}{'height'}{'minimal'}
971 0 0 0 $f->{'isbullet'} or $f->{'opts'}{'height'}{'minimal'}
972 0 0 0 $f->{'line'} and $row > 0 or $f->{'done'}
979 0 0 0 $f->{'opts'}{'height'}{'max'} || $maxheight
981 0 0 0 $f->{'literal'} or $f->{'line'}
0 0 0 $f->{'literal'} or $f->{'line'} or $f->{'done'}
985 0 0 0 $f->{'isbullet'} or not $f->{'opts'}{'height'}{'minimal'}
986 0 0 0 $f->{'line'} and $row > 0 or $f->{'done'}
993 0 0 0 $f->{'opts'}{'height'}{'max'} || $maxheight
995 0 0 0 $has_nonminimal or $f->{'done'}
1012 0 0 0 $f->{'isbullet'} or $f->{'opts'}{'height'}{'minimal'}
1023 0 0 0 $f->{'isbullet'} or not $f->{'opts'}{'height'}{'minimal'}
1058 44 22 0 $_->{'literal'} || $_->{'line'}
1059 0 0 0 $f->{'done'} or $f->{'isbullet'}
0 0 0 $f->{'done'} or $f->{'isbullet'} or $f->{'opts'}{'height'}{'minimal'}
1195 0 0 22 $more or $section == $section[-1] and $pagetype ne 'last'
1360 0 0 0 $ws ||= qr/\s/