Branch Coverage

GO/Parsers/obo_text_parser.pm
Criterion Covered Total %
branch 163 262 62.2


line true false branch
75 0 10 if ($ENV{'OBO_IDMAP'})
78 0 0 if (/(.*)=(.*)/)
89 0 3715 if (/^encoding:\s*utf/)
93 3715 0 unless ($is_utf8)
110 502 3213 unless $_
111 0 0 if $litemode and not $_ =~ /^(\[|id:|name:|is_a:|relationship:|namespace:|is_obsolete:)/ and not $in_hdr
112 494 2719 if (/^\[(\w+)\]\s*(.*)/) { }
94 2625 elsif ($in_hdr) { }
2625 0 elsif (/^([\w\-]+)\:\s*(.*)/) { }
120 10 484 if ($in_hdr) { }
125 149 335 unless ($namespace_set)
126 0 149 if (not $namespace) { }
127 0 0 if ($stanza ne 'instance')
135 11 473 if $is_root
140 32 462 unless $stanza eq 'term'
149 94 0 if (/^([\w\-]+)\:\s*(.*)/) { }
151 12 82 if ($tag eq 'subsetdef')
152 12 0 if ($val =~ /(\S+)\s+(.*)/) { }
166 18 76 if ($tag eq 'synonymtypedef')
167 18 0 if ($val =~ /(\S+)\s+\"(.*)\"\s*(.*)/) { }
171 18 0 $scope ? :
181 0 94 if ($tag eq 'idspace')
183 0 0 unless ($global)
187 0 0 @rest ? :
192 0 94 if ($tag eq 'local-id-mapping')
193 0 0 if ($val =~ /(\S+)\s+(.*)/) { }
203 0 94 if ($tag eq 'import')
204 0 0 if ($ENV{'OBO_FOLLOW_IMPORTS'}) { }
216 10 84 if ($tag eq 'default-namespace')
217 10 0 unless $namespace
220 13 81 if ($tag eq 'id-mapping')
221 13 0 if ($val =~ /(\S+)\s+(.*)/) { }
223 0 13 if ($id_remap_h{$1})
232 0 94 if ($tag eq 'default-id-prefix')
248 494 2131 if ($tag eq 'id') { }
494 1637 elsif ($tag eq 'name') { }
97 1540 elsif ($tag eq 'relationship') { }
4 1536 elsif ($tag eq 'intersection_of' or $tag eq 'union_of') { }
476 1060 elsif ($tag eq 'inverse_of' or $tag eq 'transitive_over' or $tag eq 'is_a') { }
2 1058 elsif ($tag eq 'disjoint_from') { }
118 940 elsif ($tag eq 'xref') { }
1 939 elsif ($tag eq 'xref_analog') { }
0 939 elsif ($tag eq 'xref_unknown') { }
116 823 elsif ($tag eq 'property_value') { }
338 485 elsif ($tag eq 'namespace') { }
43 442 elsif ($tag eq 'def') { }
380 62 elsif ($tag =~ /(\w*)synonym/) { }
0 62 elsif ($tag =~ /formula/) { }
0 62 elsif ($tag eq 'holds_temporally_between' or $tag eq 'holds_atemporally_between' or $tag eq 'holds_on_class_level_between') { }
0 62 elsif ($tag eq 'holds_over_chain' or $tag eq 'equivalent_to_chain') { }
0 62 elsif ($tag =~ /^expand/) { }
249 6 488 if ($id_remap_h{$val})
252 13 481 unless ($val =~ /:/)
253 0 13 if ($default_id_prefix)
261 0 494 if ($usc)
268 75 22 if ($id_remap_h{$type})
271 22 75 unless ($type =~ /:/)
272 0 22 if ($default_id_prefix)
281 2 2 if ($id_remap_h{$type})
284 0 4 unless ($type =~ /:/)
285 0 0 if ($default_id_prefix)
289 2 2 if (defined $id) { }
298 3 473 if ($id_remap_h{$val})
301 23 453 unless ($val =~ /:/)
302 0 23 if ($default_id_prefix)
308 0 2 if ($id_remap_h{$val})
311 0 2 unless ($val =~ /:/)
312 0 0 if ($default_id_prefix)
331 0 116 if ($val =~ /^(\S+)\s+(\".*)/) { }
353 0 338 if ($force_namespace) { }
371 1 379 if ($scope)
373 1 0 if ($scope =~ /(\w+)_$/) { }
383 297 83 if (@$extra_quals)
386 278 19 if @$extra_quals
388 0 380 if ($$qh{'scope'}) { }
389 0 0 if ($scope)
390 0 0 if ($scope ne $$qh{'scope'}) { }
410 0 0 if (@$extra_quals)
423 0 0 if ($id_remap_h{$sub})
426 0 0 if ($id_remap_h{$ob})
435 0 0 if ($id_remap_h{$_})
438 0 0 unless ($rel =~ /:/)
439 0 0 if ($default_id_prefix)
456 29 2596 if (not ref $val and $val eq 'true')
459 0 2625 if (not ref $val and $val eq 'false')
462 390 2235 if (%$qh) { }
471 389 1 ref $val ? :
481 553 2072 if ($tag eq 'is_a' or $tag eq 'relationship')
484 0 2625 if ($tag eq 'is_obsolete' and $val)
487 494 2131 if ($tag eq 'id')
490 494 2131 if ($tag eq 'name')
491 0 494 if (not $id) { }
505 7 3 unless ($namespace_set)
506 0 7 if (not $namespace and $stanza_count) { }
513 0 10 if $is_root
534 10 2615 if ($str =~ /(.*[^\s])\s+(\{.*)\}\s*$/) { }
537 10 0 if ($extr)
540 0 10 if (/(\w+)=\"(.*)\"/) { }
0 10 elsif (/(\w+)=\'(.*)\'/) { }
10 0 elsif (/(\w+)=(\S+)/) { }
566 428 7 if $txt
567 428 7 if $txt
568 0 435 if ($prefix)
577 278 157 if ($rem =~ /(\w+)\s+(\w+)\s+(\[.*)/) { }
19 138 elsif ($rem =~ /(\w+)\s+(\[.*)/) { }
590 435 353 unless $extr
593 95 258 if $extr
598 428 7 if $txt
620 0 228 if ($str =~ /(.*)\s+\"(.*)\"$/)
627 0 228 if ($db eq 'http' and $acc =~ m[^//]) { }
640 0 228 unless $db
641 0 228 unless $acc
642 0 228 defined $name ? :
652 0 4 if ($rest)
661 1 14 if ($expr =~ /^\((.*)/) { }
7 7 elsif ($expr =~ /^([\w\:\.\-]+)\^(.*)/) { }
7 0 elsif ($expr =~ /^([\w\:\.\-]+)(.*)/) { }
665 1 0 if ($next_c eq ')') { }
698 0 0 if ($rest)
709 10 0 if ($expr =~ /^(.+?)\((.*)/) { }
713 3 7 ref $term ? :
715 10 0 if ($rest) { }
717 10 0 if ($next_c eq ')') { }
719 2 8 if ($next_c eq '^' or $next_c eq ',') { }
4 4 elsif ($next_c eq '') { }
4 0 elsif ($next_c eq ')') { }
721 0 2 unless ($next_diffs)
774 0 0 if @_ > 1 and ref $_[0] || defined $_[1] && $_[0] eq $CGI::DefaultClass
776 0 0 unless defined $toencode
779 0 0 if ($EBCDIC) { }
788 0 0 unless defined(my $toencode = shift())