Branch Coverage

blib/lib/Net/LDAP/Server/Test.pm
Criterion Covered Total %
branch 101 196 51.5


line true false branch
114 0 7 if $ENV{'LDAP_DEBUG'}
136 1 16 if (defined $self->{'_flags'}{'data'}) { }
14 2 elsif (defined $self->{'_flags'}{'auto_schema'}) { }
166 14 0 defined $reqData->{'scope'} ? :
167 0 14 unless $reqData->{'attributes'}
170 14 0 if (exists $reqData->{'filter'})
176 0 14 if ($ENV{'LDAP_DEBUG'})
184 0 14 if (exists $reqMsg->{'controls'})
187 0 0 if ($ENV{'LDAP_DEBUG'})
191 0 0 if ($control->{'type'} eq '1.2.840.113556.1.4.319')
194 0 0 if ($ENV{'LDAP_DEBUG'})
199 0 0 if ($ENV{'LDAP_DEBUG'})
205 0 0 unless ($asn->cookie)
209 0 0 if ($ENV{'LDAP_DEBUG'})
229 8 24 unless $dn =~ /$base$/
231 12 12 if ($scope eq 'base') { }
6 6 elsif ($scope eq 'one') { }
232 4 8 unless $dn eq $base
239 4 2 unless $dn_depth == $base_depth + 1
244 0 16 if ($ENV{'LDAP_DEBUG'})
251 11 5 if ($filter->match($entry))
259 11 5 if ($match == scalar @filters)
265 0 11 if (@attrs)
284 0 14 if ($ENV{'LDAP_DEBUG'})
289 0 0 if ($page_size)
294 3 11 if ($scope eq 'base' and $total_found == 0)
298 0 11 if ($page_size and $offset > $#results) { }
0 11 elsif ($page_size and @results) { }
0 22 elsif (defined $page_size and $page_size == 0) { }
300 0 0 if ($ENV{'LDAP_DEBUG'})
308 0 0 if ($control->isa('Net::LDAP::Control::Paged'))
317 0 0 if ($limit > $#results)
321 0 0 if ($ENV{'LDAP_DEBUG'})
329 0 0 if ($ENV{'LDAP_DEBUG'})
360 0 2 if $base =~ /dying/
363 0 2 if $base =~ /invalid entry/
366 0 2 if $base =~ /invalid result/
369 2 0 if ($reqData->{'scope'}) { }
430 0 10 if ($ENV{'LDAP_DEBUG'})
435 1 9 if (exists $Data{$key})
447 0 9 if (exists $self->{'_flags'}{'active_directory'})
457 0 8 if ($ENV{'LDAP_DEBUG'})
462 1 7 unless (exists $Data{$key})
474 3 4 if ($mod->{'operation'} == 0) { }
3 1 elsif ($mod->{'operation'} == 1) { }
1 0 elsif ($mod->{'operation'} == 2) { }
475 2 1 if (defined $current_value)
477 1 1 if (grep {$_ eq $v;} @$vals)
486 1 2 unless (defined $current_value)
499 0 5 if ($self->{'_flags'}{'active_directory'})
510 0 0 if ($ENV{'LDAP_DEBUG'})
515 0 0 unless (exists $Data{$key})
534 0 3 if (defined $reqData->{'newSuperior'}) { }
545 1 2 unless (exists $Data{$oldkey})
548 1 1 if (exists $Data{$newkey})
557 1 0 if ($reqData->{'deleteoldrdn'})
591 0 0 if ($attr->{'type'} eq 'objectClass')
592 0 0 if (grep {$_ eq 'group';} @{$$attr{'vals'};}) { }
598 0 0 if ($ENV{'LDAP_DEBUG'})
610 0 0 unless defined $gid
641 0 0 unless ($entry->get_value('sAMAccountName'))
657 0 0 if (not exists $groups{$key} and exists $users{$dn})
673 0 0 if ($entry->get_value('sAMAccountName'))
687 0 0 unless (exists $users{$key})
714 50 0 if ($Net::LDAP::Server::VERSION ge '0.43') { }
727 2 48 unless my $mid = $request->{'messageID'}
735 48 257 if (defined $request->{$type})
740 5 43 unless my $respType = $Net::LDAP::Server::respTypes{$reqType}
749 43 0 if ($self->can($method)) { }
750 17 26 if ($method eq 'search') { }
755 11 6 if (ref $entries[0] eq 'ARRAY')
764 0 17 if ($@)
773 38 0 if (ref $entry eq 'Net::LDAP::Entry') { }
0 0 elsif (ref $entry eq 'Net::LDAP::Reference') { }
787 0 38 if (defined $data->{'protocolOp'}) { }
798 38 0 if ($pdu) { }
810 0 43 unless $result
836 0 43 if (defined $controls)
845 0 43 unless ($pdu)
903 15 0 eval { do { require IO::Socket::INET6 } } ? :
913 0 2 if ($arg{'data'} and $arg{'auto_schema'})
922 0 16 if (not defined $pid) { }
7 9 elsif ($pid == 0) { }
930 0 0 ref $port ? :
0 7 if $ENV{'LDAP_DEBUG'}
934 0 7 ref $port ? :
0 7 unless my $sock = ref $port ? $port : $class->new('Listen', 5, 'Proto', 'tcp', 'Reuse', 1, 'LocalPort', $port)
949 7 50 if ($fh == $sock) { }
960 7 43 if ($result)
969 7 0 unless (keys %Handlers)
971 0 7 if $ENV{'LDAP_DEBUG'}
986 0 9 if $ENV{'LDAP_DEBUG'}
988 0 9 unless <$r_fh> =~ /Ready/
1015 0 3 if $ENV{'LDAP_DEBUG'}
1021 0 2 if $ENV{'LDAP_DEBUG'}
1024 1 2 if ($@) { }
1030 0 2 if $ENV{'LDAP_DEBUG'}
1036 0 0 if ($tries++ > 10)