Branch Coverage

blib/lib/Pinwheel/View/ERB.pm
Criterion Covered Total %
branch 212 212 100.0


line true false branch
53 47 62 unless $name
60 51 46 if ($addnl and $s =~ /\n\s*$/)
79 53 69 if ($1 ne '')
81 52 1 unless $1 =~ /^\s*$/
83 1 121 unless $line =~ /\G$CLOSE_TAG_RE/cg
85 119 2 unless ($1 =~ /^\s*$/)
87 68 51 $echo ? :
90 127 122 if ($line =~ /\G(.*[^\s])\s*$/)
97 113 136 if $linetype & 6
100 128 121 $addnl ? :
104 224 313 if ($type != $TEXT and $text ne '')
108 179 358 if $type == $TEXT and $linetype != 4
109 119 418 if $type == $CODE
131 4 25 if scalar @blocks < 1 or $blocks[-1][0] ne $_[0]
136 2 53 unless $block
140 3 210 if scalar @blocks > 0
146 283 27 unless (exists $stridx{$_[0]})
152 1 52 $_[1] ? :
184 11 503 if ($type eq '') { }
156 347 elsif ($type eq 'STMT') { }
16 331 elsif ($type eq 'ID' || $type eq '@ID' and $next_type eq '=') { }
7 324 elsif ($type eq 'ID' and $next_type eq ',') { }
185 4 7 if &$lexer(1)->[1] ne ''
199 200 93 $echo ? :
201 5 456 if &$lexer(1)->[0] ne ''
213 19 137 if ($stmt eq 'for') { }
53 84 elsif ($stmt eq 'if') { }
6 78 elsif ($stmt eq 'elsif') { }
23 55 elsif ($stmt eq 'else') { }
242 291 2 if $$token[0] ne 'STMT' or $$token[1] ne 'if'
258 4 19 unless $$token[0] eq 'ID'
262 4 11 unless $$token[0] eq 'in'
265 8 2 if (scalar @vars == 1) { }
281 75 10 if $$token[0] ne 'or' and $$token[0] ne 'and'
284 6 4 if ($$token[0] eq 'or') { }
301 85 21 unless $cmp =~ /^==|!=|<=|>=|<|>$/
304 7 14 if ($cmp eq '==') { }
4 10 elsif ($cmp eq '!=') { }
322 11 5 $$token[0] eq 'ID' ? :
335 1 15 unless $$token[0] eq 'ID'
339 1 5 unless $$token[0] eq '='
354 526 58 if $$token[0] ne '+' and $$token[0] ne '-'
357 42 13 if ($$token[0] eq '+') { }
374 584 7 if $op ne '*' and $op ne '/' and $op ne '%'
388 4 636 if ($$token[0] eq '') { }
19 617 elsif ($$token[0] eq '!') { }
10 607 elsif ($$token[0] eq '-') { }
393 16 3 $n & 1 ? :
410 292 344 if ($$token[0] eq 'NUM') { }
78 266 elsif ($$token[0] eq 'STR') { }
8 258 elsif ($$token[0] eq 'SYM') { }
17 241 elsif ($$token[0] eq '(') { }
11 230 elsif ($$token[0] eq '{') { }
8 222 elsif ($$token[0] eq '[') { }
93 129 elsif ($$token[0] eq 'ID' and &$lexer(2)->[0] eq '(') { }
123 6 elsif ($$token[0] eq 'ID' or $$token[0] eq '@ID') { }
420 3 13 unless $$token[0] eq ')'
446 6 5 if $$token[0] ne ','
450 1 6 if $$token[0] ne ']'
463 1 10 if $$token[0] ne 'SYM'
466 1 9 if $$token[0] ne '=>'
469 7 2 if $$token[0] ne ','
472 1 8 if $$token[0] ne '}'
486 55 38 if ($$token[0] ne ')') { }
488 12 56 if (&$lexer(1)->[0] eq 'SYM' and &$lexer(2)->[0] eq '=>')
498 6 84 if $$token[0] ne ')'
500 12 72 if (&$lexer(1)->[0] eq 'do') { }
502 2 10 if &$lexer(1)->[0] ne ''
519 105 18 $$token[0] eq 'ID' ? :
525 52 12 if ($s eq '.') { }
527 7 45 if $$token[0] ne 'ID' and $$token[0] ne 'STMT'
529 22 23 if $$token[1] =~ /$slow_attrs/
534 1 11 if $$token[0] ne ']'
538 42 73 if (scalar @attribs > 0)
551 1 21 if ref $_[0]
552 1 20 if ref $_[1]
553 15 5 if $_[0] =~ /^-?\d+$/ and $_[1] =~ /^-?\d+$/
560 11 6 ref $obj eq 'HASH' ? :
569 5 1 ref $obj eq 'HASH' ? :
14 6 ref $obj eq 'ARRAY' ? :
20 9 ref $obj ? :
590 116 94 unless $name
622 3 180 unless defined $s
623 174 6 unless $s =~ /[&<>'"\x80-\xff]/
636 1 1 ord $i < 224 ? :
651 165 2424 if $s =~ /\G(if|elsif|else|for|end)(?!\w)/cgx
652 40 2384 if $s =~ /\G,/cg
653 23 2361 if $s =~ /\G=>/cg
654 55 2306 if $s =~ /\G\./cg
655 191 2115 if $s =~ m[\G(==|!=|<=|>=|[-=+*/%<>!]|[{}])]cg
656 14 2101 if $s =~ /\Gdo(?!\w)/cg
657 13 2088 if $s =~ /\Gin(?!\w)/cg
658 8 2080 if $s =~ /\G(\|\||or(?!\w))/cg
659 6 2074 if $s =~ /\G(\&\&|and(?!\w))/cg
660 116 1958 if $s =~ /\G\(/cg
661 103 1855 if $s =~ /\G\)/cg
662 20 1835 if $s =~ /\G\[/cg
663 17 1818 if $s =~ /\G\]/cg
664 318 1500 if $s =~ /\G(\d+)/cg
665 81 1419 if $s =~ /\G(['"])(.*?)\1/cg
666 313 1106 if $s =~ /\G([A-Za-z_]\w*)/cg
667 26 1080 if $s =~ /\G@([A-Za-z_]\w*)/cg
668 34 1046 if $s =~ /\G:([A-Za-z_]\w*)/cg
669 547 499 unless $s =~ /\G(?:\s+|#.*)/cg
675 5299 1590 if ($_[0]) { }
680 1346 244 if @buf > 0