Branch Coverage

blib/lib/Biblio/bp/lib/bp-bibtex.pl
Criterion Covered Total %
branch 88 280 31.4


line true false branch
72 0 0 unless defined $opt
74 0 0 unless $opt =~ /=/
77 0 0 if (/^complex$/)
79 0 0 if (/^crossref$/)
170 0 134 if (@glb_readahead and not $glb_noreadahead)
175 0 134 if ($opt_complex == 0) { }
134 0 elsif ($opt_complex == 1) { }
177 0 0 if /^\@/
179 0 0 if eof
185 0 0 unless defined $type
188 0 0 if $type =~ /^comment/i
190 0 0 if $type =~ /^preamble/i
192 0 0 if ($type =~ /^string/i)
195 0 0 if (($name, $value) = /^\@string{(\S+)\s*=\s*"([^"]*)"}$/i) { }
210 0 0 if /^\}\s*$/
230 132 132 if (/^\s*\@/)
235 2 132 if eof
240 0 132 unless defined $type
245 0 132 if ($type eq 'comment')
250 0 132 if ($type eq 'preamble')
255 0 132 if ($type eq 'string')
258 0 0 if $delim eq '('
268 0 0 if $ent =~ /#/
270 0 0 if (($name, $value) = $ent =~ /^(\S+)\s*=\s*[{"(]((.|\n)*)[}")]$/) { }
271 0 0 if ($name =~ /["#\%'(),={}]/) { }
275 0 0 if defined $glb_replace{$name}
290 32 100 if ($ent =~ /#/)
303 0 0 if ($opt_complex == 0 and $glb_eval_repl)
306 0 0 if $@
318 132 0 if ($lmatch eq '{') { }
0 0 elsif ($lmatch eq '(') { }
0 0 elsif ($lmatch eq '"') { }
334 0 132 if ($braces < 0)
337 0 132 if $braces <= 0
340 1878 0 if ($do_string_matching)
344 10 1868 if (/^(\s*(\S+)\s*=\s*)([^"#%'(),={}\s]+)/)
351 10 0 if (defined $glb_replace{$macro_lower}) { }
354 0 0 if (not $macro =~ /^\d+$/ and defined $i_order{$mfield})
363 132 1746 if $braces <= 0
366 0 132 if (eof and $braces > 0)
369 0 132 if ($braces < 0)
384 0 32 unless $rest =~ /#/
404 0 68 if ($bracelev <= 0 and $quotes % 2 == 0) { }
409 0 0 if ($left =~ s/\}\s*$//) { }
0 0 elsif ($left =~ s/"\s*$//) { }
422 0 0 unless ($left =~ /"\d+$/)
428 0 0 if ($right =~ s/^\s*([{"])//) { }
431 0 0 if ($string_term eq '}' and $1 eq '"')
434 0 0 if ($string_term eq '"' and $1 eq '{')
440 0 0 if ($right =~ /^\s*([^"#%'(),={}\s]+)/) { }
444 0 0 if (defined $glb_replace{$macro_lower}) { }
447 0 0 unless ($macro =~ /^\d+$/)
481 0 132 unless scalar @e_values > 1
487 10 1722 unless $val =~ s/^\s*\{((.|\n)*)\}\s*$/$1/
495 0 132 if ($opt_crossref and defined $be_entry{'crossref'})
544 0 0 unless defined $i_order{$a}
545 0 0 unless defined $i_order{$b}
553 0 0 unless defined $entry{'TYPE'}
554 0 0 unless defined $entry{'CITEKEY'}
631 20 112 if /^article/
632 8 124 if /^book/
633 0 132 if /^booklet/
634 0 132 if /^collection/
635 0 132 if /^conference/
636 2 130 if /^inbook/
637 6 126 if /^incollection/
638 66 66 if /^inproceedings/
639 2 130 if /^manual/
640 0 132 if /^mastersthesis/
641 0 132 if /^misc/
642 6 126 if /^phdthesis/
643 16 116 if /^proceedings/
644 6 126 if /^techreport/
645 0 132 if /^unpublished/
647 0 132 unless (defined $can{'CiteType'})
652 126 6 unless (defined $rec{'type'})
653 0 126 if ($rec{'TYPE'} =~ /^phdthesis/i) { }
0 126 elsif ($rec{'TYPE'} =~ /^mastersthesis/i) { }
661 110 22 if (defined $rec{'author'})
664 0 110 if ($rec{'author'} =~ /^\{/ and $rec{'author'} =~ /\}$/) { }
672 10 122 if (defined $rec{'editor'})
675 0 10 unless $can{'Editors'} =~ /\S/
679 0 132 if (defined $rec{'organization'} and defined $rec{'school'})
684 0 132 if (defined $rec{'publisher'} and defined $rec{'institution'})
689 34 98 if (defined $rec{'number'})
690 6 28 if ($can{'CiteType'} =~ /report|thesis/) { }
698 52 80 if (defined $rec{'month'})
700 52 0 if defined $can{'Month'}
707 0 1658 unless $btxv =~ /\S/
708 934 724 if (defined $btx_to_can_fields{$btxf}) { }
718 196 200 unless defined $can{$canf}
754 0 304 if (($vonlast, $jr, $first) = $n =~ /^([^,]*),\s*([^,]*),\s*([^,]*)$/) { }
0 304 elsif (($vonlast, $first) = $n =~ /([^,]*),\s*([^,]*)/) { }
764 698 8 if ($part =~ /^[^a-z]/ and $vonlast eq '') { }
773 4 300 if ($vonlast ne '') { }
774 4 0 if ($vonlast =~ /^[a-z]/) { }
777 8 0 if ($part =~ /^[a-z]/ and $last eq '') { }
797 0 120 if (@savechars)
804 0 0 unless $canon_name =~ s/(^|$bib::cs_sep|$bib::cs_sep2)$bib::cs_temp$saveptr($|$bib::cs_sep|$bib::cs_sep2)/$1$oldcharmb$2/
859 0 0 unless (defined $reccan{'CiteType'})
867 0 0 if (/^article/) { }
0 0 elsif (/^avmaterial/) { }
0 0 elsif (/^book/) { }
0 0 elsif (/^inbook/) { }
0 0 elsif (/^inproceedings/) { }
0 0 elsif (/^manual/) { }
0 0 elsif (/^misc/) { }
0 0 elsif (/^thesis/) { }
0 0 elsif (/^proceedings/) { }
0 0 elsif (/^report/) { }
0 0 elsif (/^unpublished/) { }
870 0 0 if (defined $reccan{'Publisher'}) { }
873 0 0 if (defined $reccan{'SuperTitle'}) { }
879 0 0 if (defined $reccan{'ReportType'} and $reccan{'ReportType'} =~ /master/i) { }
891 0 0 unless defined $reccan{'CiteKey'}
896 0 0 if (defined $reccan{'Authors'})
899 0 0 unless ($record{'author'} =~ / /)
900 0 0 if ($record{'author'} =~ s/\240/ /g)
905 0 0 if (defined $reccan{'CorpAuthor'})
908 0 0 if (defined $record{'author'}) { }
909 0 0 if (defined $reccan{'Organization'}) { }
920 0 0 if (defined $reccan{'Editors'})
925 0 0 if ($reccan{'CiteType'} =~ /^(report|unpublished)/)
926 0 0 if (defined $reccan{'Publisher'}) { }
0 0 elsif (defined $reccan{'Organization'}) { }
942 0 0 if (defined $reccan{'ReportNumber'}) { }
0 0 elsif (defined $reccan{'Number'}) { }
943 0 0 if (defined $reccan{'Number'})
947 0 0 unless ($reccan{'CiteType'} =~ /report|thesis/)
953 0 0 if ($reccan{'CiteType'} =~ /report|thesis/)
960 0 0 if (defined $reccan{'ReportType'})
961 0 0 unless ($reccan{'ReportType'} =~ /($protectB|$protectE)/o)
972 0 0 if (defined $can_to_btx_fields{$canf}) { }
1003 0 0 unless (defined $glb_crossref_entries{$id})
1004 0 0 unless (&get_record_ahead($id))
1017 0 0 if defined $bent{$cfield}
1042 0 0 if ($next_record =~ /crossref\s*=\s*[{"]([^}"]+)/i)
1043 0 0 unless (defined $glb_crossref_entries{$1})
1050 0 0 if (defined $glb_crossref_needed{$id})
1056 0 0 if $id eq $needed_id