Branch Coverage

blib/lib/Text/Xslate/Syntax/Handlebars.pm
Criterion Covered Total %
branch 90 108 83.3


line true false branch
55 359 783 if ($close_tag) { }
359 424 elsif ($input =~ s/\A\Q$tag_start\E//) { }
424 0 elsif ($input =~ s/\A([^\n]*?(?:\n|(?=\Q$tag_start\E)|\z))//) { }
61 359 0 if (length $code == 0)
67 359 0 if ($pos >= 0) { }
69 0 359 unless $input =~ s/\A\Q$close_tag\E//
74 6 353 if $code eq '^'
80 2 357 if ($code =~ s/^=\s*([^\s]+)\s+([^\s]+)\s*=$//) { }
0 357 elsif ($code =~ /^=/) { }
87 122 237 if ($autochomp and $standalone) { }
88 94 28 if ($input =~ /\A\s*(?:\n|\z)/)
90 73 5 if (@chunks > 0 and $chunks[-1][0] eq 'text' and not $code =~ /^>/)
92 49 24 if (@raw_text)
102 83 276 if ($code =~ m[^/] or $code eq 'else')
105 9 74 if (@raw_text)
109 96 263 if (@raw_text)
110 8 88 if ($close_tag eq '}}}') { }
117 83 276 if ($code =~ /^[#^]/ or $code eq 'else')
122 357 2 if (length $code)
123 25 332 $close_tag eq '}}}' ? :
137 25 334 if ($tag_start eq '{{' and $input =~ s/\A\{//) { }
146 424 0 if (length $text)
149 243 181 if ($standalone) { }
156 148 276 if (@raw_text)
166 0 145 if ($close_tag)
188 424 357 if ($type eq 'text') { }
332 25 elsif ($type eq 'code') { }
25 0 elsif ($type eq 'raw_code') { }
190 392 32 if length $content
195 73 259 if ($content =~ s[^/][]) { }
10 249 elsif ($content eq 'else') { }
289 2 2608 if (/\G $comment_rx /cgmsx) { }
806 1802 elsif (/\G ($id_rx)/cgmsx) { }
650 1152 elsif (/\G ($Text::Xslate::Syntax::Handlebars::NUMBER | $STRING)/cgmosx) { }
1007 145 elsif (/\G ($OPERATOR_TOKEN)/cgmosx) { }
0 145 elsif (/\G (\S+)/cgmsx) { }
318 3 109 if ($self->token->is_defined)
338 1 47 if ($left->arity eq 'call' and $left->first->id eq 'mark_raw')
358 0 38 if ($name->arity ne 'key' and $name->arity ne 'key_field' and $name->arity ne 'call')
369 10 63 if ($self->token->id eq 'else')
392 1 72 if ($inverted)
394 1 0 unless ($block{'if'})
404 0 38 if ($closing_name->arity ne 'key' and $closing_name->arity ne 'key_field' and $closing_name->arity ne 'call')
409 0 73 if ($name_string ne $closing_name_string)
447 1 2 if ($self->token->id ne ';')
452 0 3 $partial->id =~ /\./ ? :
510 4 646 if ($literal =~ /\A\[(.*)\]\z/ms)
524 3 44 if $field->arity eq 'literal'
526 33 11 if $field->arity eq 'key'
528 11 0 if $field->id eq '..'
543 52 70 if ($token->has_led) { }
548 0 70 if ($left->arity ne 'call')
570 0 47 unless ($self->is_valid_field($field))
599 146 0 unless $symbol->arity eq 'field'