Branch Coverage

blib/lib/Verilog/Getopt.pm
Criterion Covered Total %
branch 120 168 71.4


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)
392 8 1 if (defined $ENV{$var})
413 0 601 unless defined $filename
414 25 576 if defined $self->{'_file_path_cache'}{$filename}
415 492 84 if (-r $filename and not -d $filename)
422 0 84 if (-r $filename and not -d $filename)
430 30 54 if ($lookup_type eq 'module') { }
0 54 elsif ($lookup_type eq 'include') { }
447 3 165 if $checked_dir{$dir}
451 0 283 if $checked_file{$found}
452 71 212 if (-r $found and not -d $found)
466 0 0 unless $filename
469 0 0 if $filename =~ /$re/
502 702 484 if (ref $val) { }
513 606 1923 if (not defined $val) { }
828 1095 elsif (ref $val and defined $val->[1]) { }
525 0 1730 unless defined $val
526 926 804 if (ref $val) { }
536 0 555 if (ref $val) { }
544 8548 0 if (@_)
549 22 8526 if $Verilog::Getopt::Debug
552 415 8133 if (ref $oldval eq 'ARRAY')
555 1 0 if (defined $oldval and $oldval ne $value || ($oldparams || '') ne ($params || '') and $self->{'define_warnings'})
559 0 1 length $oldval < 40 && $oldval =~ /^[^\n\r\f]$/ && length $value < 40 && $value =~ /^[^\n\r\f]$/ ? :
565 7985 563 if ($params or $cmdline) { }
585 876 310 unless ($self->defcmdline($def))
596 0 0 if $sym eq $val
599 0 0 if defined $val