Branch Coverage

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


line true false branch
64 0 16 unless open my $in, "<", $string
67 0 16 unless close $in
88 0 48 unless my $langdef = langdef($feature->language)
128 583 152 if ($continuation) { }
170 44 4 unless $lines and @$lines and $lines->[0]->raw_content =~ /^\s*#\s*language:\s+([^\s]+)/
194 6 54 if $line->is_comment
195 0 54 if $line->is_blank
197 48 6 if (my($keyword, $name) = $self->_is_feature_line($line->content)) { }
6 0 elsif ($line->content =~ /^\s*\@\w/) { }
228 50 139 if $line->is_comment or $line->is_blank
230 47 92 if ($self->_is_scenario_line($line->content) or $self->_is_tags_line($line->content)) { }
245 138 61 if (@{$feature->scenarios;})
247 1 137 if ($last_scenario->keyword_original =~ /^($self->{'langdef'}{'scenarioOutline'})/ and not @{$last_scenario->datasets;})
264 18 190 if $line->is_comment or $line->is_blank
266 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/) { }
270 0 26 unless @{$feature->scenarios;}
275 0 26 $name ? :
0 26 @tags ? :
286 1 25 if (@{$feature->scenarios->[-1]->datasets;})
290 0 1 if $prev_ds_cols ne $cur_ds_cols
305 0 151 if ($scenarios++ and $type =~ /^($langdef->{'background'})/)
321 112 39 $name ? :
13 138 $type =~ /^($langdef->{'background'})/ ? :
2 136 $type =~ /^($langdef->{'scenarioOutline'})/ ? :
13 138 $type =~ /^($langdef->{'background'})/ ? :
330 13 138 if ($type =~ /^($langdef->{'background'})/) { }
362 2 471 if $line->is_comment
365 157 314 if $verb =~ /^($langdef->{'given'})$/
366 75 396 if $verb =~ /^($langdef->{'when'})$/
367 126 345 if $verb =~ /^($langdef->{'then'})$/
368 113 358 if $verb =~ /^($langdef->{'and'})$/ or $verb =~ /^($langdef->{'but'}$)/
399 0 26 if $line->is_comment
402 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)
432 38 433 unless @lines
434 27 406 if ($lines[0]->content eq '"""') { }
11 395 elsif ($lines[0]->content =~ /^\s*\|/) { }
455 27 72 if ($line->content eq "\"\"\"")
480 0 163 if $line->is_comment
481 28 135 if index $line->content, "|"
484 40 95 if ($target->can("data_as_strings"))
490 98 37 if (@columns) { }
491 0 98 unless @rows == @columns
494 29 69 if $target->can("columns")