Branch Coverage

blib/lib/OGDL/Parser.pm
Criterion Covered Total %
branch 84 132 63.6


line true false branch
22 0 0 if (-T "$name.gm")
25 0 0 if (-T "$name.g")
28 0 0 if (-T $name)
31 0 0 if (-d $name)
40 0 0 if (-d $dir)
45 0 0 if (-d $_) { }
62 0 3 unless open my $input, $_[0]
70 0 0 unless open my $input, "m4 $_[0] |"
151 5 98 if (_newline($p))
152 3 95 if (_eos($p))
162 3 92 if ($$p{'line_level'} == -1) { }
35 57 elsif ($i > $$p{'indentation'}[$$p{'line_level'}]) { }
171 24 33 if ($i < $$p{'indentation'}[$$p{'line_level'}])
173 16 30 if ($i >= $$p{'indentation'}[$$p{'line_level'}])
193 0 95 _eos($p) ? :
200 0 261 if (_eos($p))
203 6 255 if ($c eq '(') { }
6 249 elsif ($c eq ')') { }
5 244 elsif ($c eq ';') { }
18 226 elsif ($c eq ',') { }
3 223 elsif ($c eq q['] or $c eq '"') { }
1 222 elsif ($c eq '\\') { }
95 127 elsif ($c eq "\n") { }
0 127 elsif ($c eq '#') { }
127 0 elsif ($c eq 'w') { }
215 0 6 if ($$p{'ixgroup'} < 0)
255 131 0 if (defined $s)
264 0 0 unless (_newline($p))
275 3 201 unless (defined $c)
276 104 97 if ($c eq "\n")
284 3 469 if ($$p{'ix'} == -1)
310 0 0 if (_eos($p))
313 0 0 if ($c eq '#') { }
315 0 0 if ($c ne ' ' and $c ne "\t")
317 0 0 if ($c eq "\n") { }
348 3 2500 if ($c eq $term and not $cprev eq '\\') { }
352 6 2494 if ($c eq $term)
354 154 2346 if ($strip < $i and _isSpaceChar($c)) { }
2343 3 elsif ($strip == $i) { }
3 0 elsif ($strip < $i) { }
359 33 2310 if ($c eq "\n")
361 0 33 if ($cprev eq '\\')
366 0 3 if ($c ne "\n") { }
390 3 12 if ($j <= $i)
391 0 3 if (_eos($p))
392 1 2 if (not _newline($p)) { }
396 1 13 if ($is == -1)
397 0 14 if ($j > $is)
400 782 0 if ($c ne "\r")
401 14 768 if ($c eq "\n")
404 0 14 if (_eos($p))
407 1 0 unless (_eos($p))
420 0 0 if (defined $next and $next eq ' ' or $next eq '\\t') { }
430 242 127 if (defined $next and not $next =~ /^([ \t\r\n\(\);,]|# )/) { }
440 261 0 if (defined $next)
441 39 222 if ($next =~ /^(['"\(\);,]|# |\\[\r\n])/)
444 0 222 if ($next =~ /^[ \t]/)
447 95 127 if ($next =~ /^[\r\n]/) { }
478 1076 3 if (defined $_[0])
479 792 284 if ($_[0] =~ /[ \t]/)
486 0 0 if (defined $_[0]) { }
487 0 0 if ($_[0] =~ /[ \t\n\r\(\),;]/)
501 3 4689 if ($ix == -1)
503 3 4686 if ($ix >= length $lines)
517 3 382 if ($$p{'ix'} == -1)
533 0 131 unless ($$p{'g'})