Branch Coverage

blib/lib/Lab/SCPI.pm
Criterion Covered Total %
branch 129 168 76.7


line true false branch
26 66 121 if (match_keyword($header, $part))
43 0 347 if (length $keyword == 0)
47 0 347 unless ($keyword =~ /^$start_regex$keyword_regex*$/u)
51 267 80 unless ($keyword =~ /\[/u)
68 76 123 if (length $string <= 4)
76 0 123 if ($string =~ /^\*/u)
87 123 0 if ($string =~ /^([a-z]\w*[a-z_])(\d*)(\??)/iu) { }
91 8 115 if ($string =~ /^...[aeiou]/iu)
110 92 169 if (@a != @b)
118 103 83 if ($b ne $a and $b ne scpi_shortform($a))
136 66 195 if (compare_headers($combination, $header))
147 4 0 unless defined $d
163 0 105 if ($str =~ /^$WS*(;|\s*$)/u)
169 102 182 if $str =~ /^\s*$/u
171 35 147 if ($level == 0) { }
172 0 35 if ($str =~ /^(\*\w+\??)$WS*(;|\s*$)/iu) { }
1 34 elsif ($str =~ /^(\*\w+\??)$WS+/iu) { }
26 8 elsif ($str =~ /^:/u) { }
173 0 0 unless exists $dtop->{$1}
178 1 0 unless exists $dtop->{$1}
180 1 0 if ($str =~ /^$WS*(;|\s*$)/u) { }
194 0 147 if ($str =~ /^\*/u)
197 0 147 if ($str =~ /^:/u)
203 0 181 if $str =~ /^\s*$/u
205 77 104 if ($str =~ /^;/u)
207 3 74 if $str =~ /^\s*$/u
209 23 51 if $str =~ /^[\*\:]/u
216 0 104 if ($str =~ /^(\w+\??)$WS*(;|\s*$)/iu) { }
27 77 elsif ($str =~ /^(\w+)$WS*:/iu) { }
77 0 elsif ($str =~ /^(\w+\??)$WS+/iu) { }
217 0 0 unless exists $d->{$1}
221 21 6 unless exists $d->{$1}
225 77 0 unless exists $d->{$1}
245 181 198 if ($str =~ /^;/u) { }
2 196 elsif ($str =~ /^\#([1-9])/u) { }
0 196 elsif ($str =~ /^\#0/u) { }
13 183 elsif ($str =~ /^(\"(?:([^\"]+|\"\")*)\")$WS*/u) { }
0 183 elsif ($str =~ /^(\'(?:([^\']+|\'\')*)\')$WS*/u) { }
183 0 elsif ($str =~ /^([\w\-\+\.\%\!\#\~\=\*]+)$WS*/iu) { }
246 179 2 if $lastsp
254 2 0 if (length $str > $nd + 2 + $nnd) { }
288 14 184 if ($str =~ /^$WS*,/u)
290 14 0 if $lastsp
295 0 0 if $lastsp
303 3 15 unless defined $d
306 6 12 unless $str =~ /^[\*:]/u
307 16 2 unless $str =~ /;$/u
314 115 27 if ($str =~ /^;/u)
321 103 225 if ($k eq '_VALUE') { }
327 213 12 if $j < $#cur
334 18 124 if $str =~ /^\s*;?\s*$/u
337 115 9 if ($level == 0)
340 72 43 if ($str =~ /^\w/iu) { }
343 72 0 if (defined $v and $v eq '_VALUE') { }
347 0 0 if defined $v
353 36 7 if ($str =~ /^:/u)
356 0 43 if $str =~ /^\s*;?\s*$/u
358 7 36 if ($str =~ /^(\*\w+\??)$WS*;/iu) { }
0 36 elsif ($str =~ /^(\*\w+\??)$WS+/iu) { }
23 13 elsif ($str =~ /^(\w+)$WS*:/iu) { }
3 10 elsif ($str =~ /^(\w+\??)$WS*;/iu) { }
10 0 elsif ($str =~ /^(\w+\??)$WS*/iu) { }
407 12 112 if $str =~ /^\s*;?\s*$/u
409 104 8 if ($level > 0)
410 0 104 if ($str =~ /^[\*:]/u)
413 9 95 if ($str =~ /^(\w+)$WS*:/iu) { }
2 93 elsif ($str =~ /^(\w+\??)$WS*;/iu) { }
93 0 elsif ($str =~ /^(\w+\??)$WS+/iu) { }
451 43 145 unless defined $override
452 59 129 unless defined $top
458 71 135 if ($k eq '_VALUE') { }
462 65 70 if ($top)
463 6 59 if ($k =~ /^(\*\w+\??)/iu)
465 0 6 if (defined $h->{$k})
472 129 0 if ($k =~ /^([a-z]\w*[a-z_])$WS*(\d*)(\??)/iu) { }
475 0 129 unless defined $num
477 0 129 unless defined $q
483 94 702 if (uc $ko eq uc $m or $shorter eq uc $m)
492 94 35 if $ov
513 23 1 if (ref $h eq 'HASH') { }
1 0 elsif (ref $h eq 'ARRAY') { }
541 77 188 if (ref $h eq '') { }
548 185 3 if (@keys) { }
549 126 59 if $fk ne ""