Branch Coverage

blib/lib/FusionInventory/Agent/Tools/BSD.pm
Criterion Covered Total %
branch 22 24 91.6


line true false branch
22 0 4 unless $handle
34 17 78 if ($line =~ /^(\S+): flags=\d+<([^>]+)> (?:metric \d+ )?mtu (\d+)/) { }
11 67 elsif ($line =~ /(?:address:|ether|lladdr) ($FusionInventory::Agent::Tools::BSD::mac_address_pattern)/) { }
2 65 elsif ($line =~ / ssid \s (\S+) \s channel \s \d+ \s \(\d+ \s MHz \s (\S+)[^)]*\) \s bssid \s ($FusionInventory::Agent::Tools::BSD::mac_address_pattern) /x) { }
13 52 elsif ($line =~ /inet ($FusionInventory::Agent::Tools::BSD::ip_address_pattern) (?:--> $FusionInventory::Agent::Tools::BSD::ip_address_pattern )?netmask 0x($FusionInventory::Agent::Tools::BSD::hex_ip_address_pattern)/) { }
6 46 elsif ($line =~ /inet6 ([\w:]+)\S* prefixlen (\d+)/) { }
36 7 10 if (@addresses) { }
40 6 4 if $interface
44 13 4 &any(sub { $_ eq 'UP'; } , split(/,/, $flags, 0)) ? :
95 8 87 if ($line =~ /media: (\S+)/)
103 3 1 if (@addresses) { }
106 1 0 if $interface