Branch Coverage

blib/lib/BibTeX/Parser.pm
Criterion Covered Total %
branch 54 66 81.8


line true false branch
48 5 41 if $self->{'fh'}->eof
53 4 107 unless defined $line
59 36 1 if (/@($re_name)/cog) { }
71 0 156 unless defined $line
80 10 26 if ($start_pos == 0)
96 2 34 if ($type eq 'STRING') { }
2 32 elsif ($type eq 'COMMENT' or $type eq 'PREAMBLE') { }
97 2 0 if (/\G\{\s*($re_name)\s*=\s*/cog) { }
101 0 2 if (defined $self->{'strings'}{$key})
117 31 1 if (/\G\s*\{(?:\s*($re_name)\s*,[\s\n]*|\s+\r?\s*)/cog) { }
126 116 19 if $idx > 0
161 0 3 if (/\G[^\}]*\{/cg)
163 2 1 if (/\G[^\{]*\}/cg)
164 0 2 if ($bracelevel > 0) { }
196 12 139 if (/\G(\d+)/cg) { }
10 129 elsif (/\G($re_name)/cog) { }
81 48 elsif (/\G"(([^"\\]*(\\.)*[^\\"]*)*)"/cgs) { }
199 0 10 unless (defined $$strings_ref{lc $1})
200 0 0 unless $no_warn_ack and $1 =~ /^ack-/
212 7 144 if (/\G\s*#\s*/cg)
229 2 173 if /\G\\./cg
230 55 118 if /\G\{/cg
231 7 48 --$depth > 0 ? :
55 63 if /\G\}/cg
232 63 0 if /\G([^\\\{\}]+)/cg
248 1 238 if $string eq ""
251 186 220 if ($string =~ /\G(.*?)(\{|$pattern)/cig) { }
253 157 29 if ($2 =~ /$pattern/i) { }
29 0 elsif ($2 =~ /\{/) { }
263 0 345 if ($symbol eq '{') { }
27 318 elsif ($symbol eq '}') { }
270 2 27 if ($numbraces != 0)
281 236 0 if $buffer