Branch Coverage

blib/lib/Verilog/Getopt.pm
Criterion Covered Total %
branch 120 170 70.5


line true false branch
37 0 752 unless @_ >= 1
66 0 3 unless $path =~ s([/\\][^/\\]*$)[]
68 0 3 if $path eq ""
77 6 0 if $Verilog::Getopt::Debug
79 3 3 if ($relative)
81 0 6 unless my $fh = "IO::File"->new("<$filename")
86 12 12 if $line =~ /^\s*$/
110 0 129 if $param =~ /^\s*$/
111 88 41 if $Verilog::Getopt::Debug
114 6 123 if ($param eq '-F' or $param eq '-f') { }
22 101 elsif ($param eq '-v' || $param eq '-y' and $self->{'vcs_style'}) { }
3 98 elsif ($param =~ /^\+libext\+(.*)$/ and $self->{'vcs_style'}) { }
21 77 elsif ($param =~ /^\+incdir\+(.*)$/ and $self->{'vcs_style'}) { }
21 56 elsif ($param =~ /^\+define\+(.*)$/ and $self->{'vcs_style'}) { }
0 56 elsif ($param =~ /^\+librescan$/ and $self->{'vcs_style'}) { }
6 50 elsif ($param =~ /^-D([^=]*)=(.*)$/ || $param =~ /^-D([^=]*)()$/ and $self->{'gcc_style'}) { }
0 50 elsif ($param =~ /^-U([^=]*)$/ and $self->{'gcc_style'}) { }
2 48 elsif ($param =~ /^-I(.*)$/ and $self->{'gcc_style'}) { }
28 20 elsif ($self->{'_parameter_next'}) { }
159 3 25 if ($pn eq '-F') { }
3 22 elsif ($pn eq '-f') { }
3 19 elsif ($pn eq '-v') { }
19 0 elsif ($pn eq '-y') { }
177 0 20 if ($self->{'filename_expansion'} and not $param =~ /^-.*$/ and $optdir ne '.') { }
184 0 0 if (-e $fn) { }
202 2 49 if ($optdir ne "." and not "File::Spec"->file_name_is_absolute($filename))
213 8537 7 if (@_)
218 50 58 if (@_)
220 8 42 if $Verilog::Getopt::Debug
221 1 49 if (ref $token and ref $token eq 'ARRAY') { }
228 58 50 wantarray ? :
232 4 3 if (@_)
234 4 0 if $Verilog::Getopt::Debug
235 0 4 if (ref $token and ref $token eq 'ARRAY') { }
242 3 4 wantarray ? :
246 3 9 if (@_)
248 3 0 if $Verilog::Getopt::Debug
249 0 3 if (ref $token and ref $token eq 'ARRAY') { }
255 9 3 wantarray ? :
259 46 88 if (@_)
261 11 35 if $Verilog::Getopt::Debug
262 1 45 if (ref $token and ref $token eq 'ARRAY') { }
269 88 46 wantarray ? :
273 563 0 if (@_)
275 0 563 if (ref $_[0] and ref $_[0] eq 'ARRAY') { }
282 1 562 if $Verilog::Getopt::Debug
288 0 563 wantarray ? :
298 9 4 if defined $defvalue and $defvalue ne ""
299 0 13 if ($args{'gcc_style'}) { }
308 3 2 unless $exts
311 3 0 if $exts
314 0 7 if ($args{'gcc_style'}) { }
333 0 0 unless my $fh = "IO::File"->new(">$filename")
341 33 0 if (@_)
357 0 0 unless $hit{$_}++
378 0 0 if "" eq dirname($filename)
379 0 0 if "File::Spec"->file_name_is_absolute($filename)
391 8 1 if defined $ENV{$var}
395 0 0 if defined $ENV{$var}
414 0 601 unless defined $filename
415 25 576 if defined $self->{'_file_path_cache'}{$filename}
416 492 84 if (-r $filename and not -d $filename)
423 0 84 if (-r $filename and not -d $filename)
431 30 54 if ($lookup_type eq 'module') { }
0 54 elsif ($lookup_type eq 'include') { }
448 3 165 if $checked_dir{$dir}
452 0 283 if $checked_file{$found}
453 71 212 if (-r $found and not -d $found)
467 0 0 unless $filename
470 0 0 if $filename =~ /$re/
503 702 484 if (ref $val) { }
514 606 1923 if (not defined $val) { }
828 1095 elsif (ref $val and defined $val->[1]) { }
526 0 1730 unless defined $val
527 926 804 if (ref $val) { }
537 0 555 if (ref $val) { }
545 8548 0 if (@_)
550 22 8526 if $Verilog::Getopt::Debug
553 415 8133 if (ref $oldval eq "ARRAY")
556 1 0 if (defined $oldval and $oldval ne $value || ($oldparams || '') ne ($params || '') and $self->{'define_warnings'})
560 0 1 length $oldval < 40 && $oldval =~ /^[^\n\r\f]$/ && length $value < 40 && $value =~ /^[^\n\r\f]$/ ? :
566 7985 563 if ($params or $cmdline) { }
586 876 310 unless ($self->defcmdline($def))
597 0 0 if $sym eq $val
600 0 0 if defined $val