Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Say why we are skipping the test when we do
  • Loading branch information
gbarr committed May 8, 2003
1 parent 2f6d5a6 commit 1154865
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions t/70sortctrl.t
Expand Up @@ -34,13 +34,24 @@ use Net::LDAP::Constant qw(
LDAP_SUCCESS
);

unless ($EXTERNAL_TESTS) {
print "1..0 # Skip External tests disabled\n";
exit 0;
}

my($host, $base, $filter, $order) = @sortctrl{qw(host base filter order)};

my $ldap = $EXTERNAL_TESTS && $host && Net::LDAP->new($host, version => 3);
my $ldap = $host && Net::LDAP->new($host, version => 3);

unless ($ldap) {
print "1..0 # Skip Cannot connect to host\n";
exit 0;
}

my $dse = $ldap && $ldap->root_dse;

unless ($dse and grep { $_ eq LDAP_CONTROL_SORTREQUEST } $dse->get_value('supportedControl')) {
print "1..0\n";
print "1..0 # Skip server does not support LDAP_CONTROL_SORTREQUEST\n";
exit;
}

Expand Down

0 comments on commit 1154865

Please sign in to comment.