Branch Coverage

blib/lib/Test/BDD/Cucumber/Parser.pm
Criterion Covered Total %
branch 74 90 82.2


line true false branch
65 0 20 unless open my $in, "<", $string
68 0 20 unless close $in
89 0 52 unless my $langdef = langdef($feature->language)
129 603 164 if ($continuation) { }
171 48 4 unless $lines and @$lines and $lines->[0]->raw_content =~ /^\s*#\s*language:\s+([^\s]+)/u
195 6 58 if $line->is_comment
196 0 58 if $line->is_blank
198 52 6 if (my($keyword, $name) = $self->_is_feature_line($line->content)) { }
6 0 elsif ($line->content =~ /^\s*\@\w/u) { }
229 50 143 if $line->is_comment or $line->is_blank
231 51 92 if ($self->_is_scenario_line($line->content) or $self->_is_tags_line($line->content)) { }
246 150 65 if (@{$feature->scenarios;})
248 1 149 if ($last_scenario->keyword_original =~ /^($self->{'langdef'}{'scenarioOutline'})/u and not @{$last_scenario->datasets;})
265 18 210 if $line->is_comment or $line->is_blank
267 26 184 if (my($type, $name) = $self->_is_examples_line($line->content)) { }
163 21 elsif (($type, $name) = $self->_is_scenario_line($line->content)) { }
21 0 elsif ($line->content =~ /^\s*\@\w/u) { }
271 0 26 unless @{$feature->scenarios;}
276 0 26 $name ? :
0 26 @tags ? :
287 1 25 if (@{$feature->scenarios->[-1]->datasets;})
291 0 1 if $prev_ds_cols ne $cur_ds_cols
306 0 163 if ($scenarios++ and $type =~ /^($langdef->{'background'})/u)
322 124 39 $name ? :
13 150 $type =~ /^($langdef->{'background'})/u ? :
2 148 $type =~ /^($langdef->{'scenarioOutline'})/u ? :
13 150 $type =~ /^($langdef->{'background'})/u ? :
331 13 150 if ($type =~ /^($langdef->{'background'})/u) { }
363 2 483 if $line->is_comment
366 169 314 if $verb =~ /^($langdef->{'given'})$/u
367 75 408 if $verb =~ /^($langdef->{'when'})$/u
368 126 357 if $verb =~ /^($langdef->{'then'})$/u
369 113 370 if $verb =~ /^($langdef->{'and'})$/u or $verb =~ /^($langdef->{'but'}$)/u
400 0 26 if $line->is_comment
403 0 0 if $self->_is_table_line($content) or $self->_is_examples_line($content) or $self->_is_tags_line($content) or $self->_is_scenario_line($content)
433 42 441 unless @lines
435 27 414 if ($lines[0]->content eq '"""') { }
11 403 elsif ($lines[0]->content =~ /^\s*\|/u) { }
456 27 72 if ($line->content eq "\"\"\"")
481 0 163 if $line->is_comment
482 28 135 if index $line->content, "|"
485 40 95 if ($target->can("data_as_strings"))
491 98 37 if (@columns) { }
492 0 98 unless @rows == @columns
495 29 69 if $target->can("columns")