1#!perl 2 3use Test::More; 4 5BEGIN { require "t/common.pl" } 6 7 8start_server() 9? plan tests => 3 10: plan skip_all => 'no server'; 11 12 13$ldap = client(); 14ok($ldap, 'client with IPv4/IPv6 auto-selection' . 15 ($ldap ? (', bound to ' . $ldap->{net_ldap_socket}->peerhost) : '')); 16 17$ldap = client(inet4 => 1); 18ok($ldap, 'client with IPv4' . 19 ($ldap ? (', bound to ' . $ldap->{net_ldap_socket}->peerhost) : '')); 20 21 22SKIP: { 23 skip('No IPv6 capable IO::Socket module installed', 1) 24 unless (eval { require IO::Socket::INET6; } or 25 eval { require IO::Socket::IP; IO::Socket::IP->VERSION(0.20); }); 26 27 $ldap = client(inet6 => 1); 28 ok($ldap, 'client with IPv6' . 29 ($ldap ? (', bound to ' . $ldap->{net_ldap_socket}->peerhost) : '')); 30} 31