Branch Coverage

blib/lib/FusionInventory/Agent/Tools/Unix.pm
Criterion Covered Total %
branch 0 64 0.0


line true false branch
30 0 0 unless $params{'device'}
33 0 0 getFirstLine('command', '/sbin/fdisk -v') =~ /^GNU/ ? :
42 0 0 if $capacity
52 0 0 unless $dhcpLeaseFile
70 0 0 unless -d $directory
79 0 0 unless @files
97 0 0 unless $handle
103 0 0 if ($line =~ /^lease/i)
107 0 0 if ($line =~ /^}/)
112 0 0 unless $lease
115 0 0 if ($line =~ /interface\s+"([^"]+)"/)
120 0 0 unless $dhcp
122 0 0 if ($line =~ /option \s+ dhcp-server-identifier \s+ (\d{1,3}(?:\.\d{1,3}){3})/x) { }
0 0 elsif ($line =~ m[expire \s+ \d \s+ (\d+)/(\d+)/(\d+) \s+ (\d+):(\d+):(\d+)]x) { }
141 0 0 unless $expiration_time
145 0 0 $current_time <= $expiration_time ? :
156 0 0 unless $line
169 0 0 if ($headers[1] eq 'Type') { }
182 0 0 if not $total =~ /^\d+$/ or $total == 0
183 0 0 if not $free =~ /^\d+$/ or $free == 0
206 0 0 unless $handle
212 0 0 if ($line =~ /^\S+ on \S+ \((\w+)/)
218 0 0 if ($line =~ /^\S+ on \S+ type (\w+)/)
252 0 0 unless $line =~ /^ \s* (\S+) \s+ (\S+) \s+ (\S+) \s+ ... \s+ (\S.+) /x
279 0 0 $FusionInventory::Agent::Tools::Unix::OSNAME eq 'solaris' ? :
298 0 0 unless $line =~ /^ \s* (\S+) \s+ (\S+) \s+ (\S+) \s+ (\S+) \s+ (\S+) \s+ (\S+) \s+ (\S+) \s+ (\S.*\S) /x
373 0 0 unless defined $psec and defined $pmin
376 0 0 $phour ? :
0 0 $pday ? :
399 0 0 unless $handle
405 0 0 if $line =~ /^Destination/
410 0 0 unless $line =~ /^ ( $FusionInventory::Agent::Tools::Unix::ip_address_pattern | $FusionInventory::Agent::Tools::Unix::network_pattern | default ) \s+ ( $FusionInventory::Agent::Tools::Unix::ip_address_pattern | $FusionInventory::Agent::Tools::Unix::mac_address_pattern | link\#\d+ ) /x