Branch Coverage

blib/lib/Text/Xslate/Syntax/Handlebars.pm
Criterion Covered Total %
branch 88 106 83.0


line true false branch
57 353 773 if ($close_tag) { }
353 420 elsif ($input =~ s/\A\Q$tag_start\E//) { }
420 0 elsif ($input =~ s/\A([^\n]*?(?:\n|(?=\Q$tag_start\E)|\z))//) { }
63 353 0 if (length $code == 0)
69 353 0 if ($pos >= 0) { }
71 0 353 unless $input =~ s/\A\Q$close_tag\E//
76 6 347 if $code eq '^'
82 2 351 if ($code =~ s/^=\s*([^\s]+)\s+([^\s]+)\s*=$//) { }
0 351 elsif ($code =~ /^=/) { }
89 120 233 if ($autochomp and $standalone) { }
90 92 28 if ($input =~ /\A\s*(?:\n|\z)/)
92 71 5 if (@chunks > 0 and $chunks[-1][0] eq 'text' and not $code =~ /^>/)
94 48 23 if (@raw_text)
104 82 271 if ($code =~ m[^/] or $code eq 'else')
107 9 73 if (@raw_text)
111 95 258 if (@raw_text)
114 82 271 if ($code =~ /^[#^]/ or $code eq 'else')
119 351 2 if (length $code)
120 15 336 $close_tag eq '}}}' ? :
134 15 338 if ($tag_start eq '{{' and $input =~ s/\A\{//) { }
143 420 0 if (length $text)
146 243 177 if ($standalone) { }
153 147 273 if (@raw_text)
163 0 142 if ($close_tag)
185 420 351 if ($type eq 'text') { }
336 15 elsif ($type eq 'code') { }
15 0 elsif ($type eq 'raw_code') { }
187 388 32 if length $content
192 72 264 if ($content =~ s[^/][]) { }
10 254 elsif ($content eq 'else') { }
286 2 2565 if (/\G $comment_rx /cgmsx) { }
795 1770 elsif (/\G ($id_rx)/cgmsx) { }
643 1127 elsif (/\G ($Text::Xslate::Syntax::Handlebars::NUMBER | $STRING)/cgmosx) { }
985 142 elsif (/\G ($OPERATOR_TOKEN)/cgmosx) { }
0 142 elsif (/\G (\S+)/cgmsx) { }
315 3 97 if ($self->token->is_defined)
335 1 47 if ($left->arity eq 'call' and $left->first->id eq 'mark_raw')
355 0 37 if ($name->arity ne 'key' and $name->arity ne 'key_field' and $name->arity ne 'call')
366 10 62 if ($self->token->id eq 'else')
389 1 71 if ($inverted)
391 1 0 unless ($block{'if'})
401 0 37 if ($closing_name->arity ne 'key' and $closing_name->arity ne 'key_field' and $closing_name->arity ne 'call')
406 0 72 if ($name_string ne $closing_name_string)
444 1 2 if ($self->token->id ne ';')
449 0 3 $partial->id =~ /\./ ? :
507 4 639 if ($literal =~ /\A\[(.*)\]\z/ms)
521 3 44 if $field->arity eq 'literal'
523 33 11 if $field->arity eq 'key'
525 11 0 if $field->id eq '..'
540 52 59 if ($token->has_led) { }
545 0 59 if ($left->arity ne 'call')
567 0 47 unless ($self->is_valid_field($field))
596 144 0 unless $symbol->arity eq 'field'