Branch Coverage

blib/lib/Test/HTML/Form.pm
Criterion Covered Total %
branch 55 84 65.4


line true false branch
237 4 3 if (ref $tag) { }
247 1 6 unless ($ok)
248 1 0 ref $tag ? :
273 0 4 unless ($ok)
296 0 1 unless ($ok)
319 0 1 unless ($ok)
341 1 0 if (ref $text_to_match eq 'Regexp')
348 0 1 unless ref $elem eq 'HTML::Element'
351 1 0 if ($pattern) { }
363 0 1 unless ($ok)
399 2 0 if ($matches)
405 0 2 unless ($ok)
445 1 1 if ($select_elem) { }
446 0 1 unless (UNIVERSAL::can($select_elem, 'descendants'))
451 0 10 unless ref $option and lc $option->tag eq 'option'
452 1 9 if (_compare($option, $field_value))
462 1 1 unless ($ok)
501 1 0 if (_compare($checkbox, $field_value))
508 0 1 unless ($ok)
532 4 2 if ($parsed_file_forms{$args->{'filename'}}{$internal_form_name}) { }
540 0 2 if ($form_name) { }
541 0 0 if $form->attr('name') eq $form_name
542 0 0 if $form->attr('id') eq $form_name
548 2 0 if (ref $form)
551 0 126 unless ref $node
552 22 104 if (lc($node->tag) =~ /^(input|select|textarea|button)$/i)
553 6 16 if (lc $node->attr('type') =~ /(radio|checkbox)/) { }
581 3 73 if $thisnode->as_trimmed_text =~ /$pattern/i
596 0 13 unless ($elem and ref $elem eq 'HTML::Element')
601 0 13 ref $field_value eq 'Regexp' ? :
603 11 2 unless (defined $value)
607 0 13 if ($have_regexp) { }
608 0 0 $elem && $value =~ /$field_value/ ? :
610 4 9 $elem && $value eq $field_value ? :
619 14 1 if (ref $attr_ref eq 'HASH') { }
621 3 11 if (ref $attr_ref->{'_content'} eq 'Regexp')
627 3 11 if ($pattern)
629 0 2 unless ref $_[0] eq 'HTML::Element'
649 1 76 if $node->as_trimmed_text =~ /$text/
656 2 19 unless ($parsed_files{$filename})
659 0 2 if (ref $filename and $filename->can('content')) { }
662 0 2 unless -f $filename