Branch Coverage

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


line true false branch
65 0 16 unless open my $in, "<", $string
68 0 16 unless close $in
89 0 48 unless my $langdef = langdef($feature->language)
129 583 152 if ($continuation) { }
171 44 4 unless $lines and @$lines and $lines->[0]->raw_content =~ /^\s*#\s*language:\s+([^\s]+)/u
195 6 54 if $line->is_comment
196 0 54 if $line->is_blank
198 48 6 if (my($keyword, $name) = $self->_is_feature_line($line->content)) { }
6 0 elsif ($line->content =~ /^\s*\@\w/u) { }
229 50 139 if $line->is_comment or $line->is_blank
231 47 92 if ($self->_is_scenario_line($line->content) or $self->_is_tags_line($line->content)) { }
246 138 61 if (@{$feature->scenarios;})
248 1 137 if ($last_scenario->keyword_original =~ /^($self->{'langdef'}{'scenarioOutline'})/u and not @{$last_scenario->datasets;})
265 18 190 if $line->is_comment or $line->is_blank
267 26 164 if (my($type, $name) = $self->_is_examples_line($line->content)) { }
151 13 elsif (($type, $name) = $self->_is_scenario_line($line->content)) { }
13 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 151 if ($scenarios++ and $type =~ /^($langdef->{'background'})/u)
322 112 39 $name ? :
13 138 $type =~ /^($langdef->{'background'})/u ? :
2 136 $type =~ /^($langdef->{'scenarioOutline'})/u ? :
13 138 $type =~ /^($langdef->{'background'})/u ? :
331 13 138 if ($type =~ /^($langdef->{'background'})/u) { }
363 2 471 if $line->is_comment
366 157 314 if $verb =~ /^($langdef->{'given'})$/u
367 75 396 if $verb =~ /^($langdef->{'when'})$/u
368 126 345 if $verb =~ /^($langdef->{'then'})$/u
369 113 358 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 38 433 unless @lines
435 27 406 if ($lines[0]->content eq '"""') { }
11 395 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")