File: 00use.t

package info (click to toggle)
libsocket-getaddrinfo-perl 0.22-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 452 kB
  • sloc: perl: 964; makefile: 14
file content (26 lines) | stat: -rw-r--r-- 682 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/usr/bin/perl -w

use strict;
use Test::More tests => 3;

use_ok( "Socket::GetAddrInfo" );
use_ok( "Socket::GetAddrInfo::Socket6api" );
use_ok( "Socket::GetAddrInfo::Strict" );

# Declare which case is being used; can be useful in test reports

if( defined $Socket::GetAddrInfo::Emul::VERSION ) {
   diag "Using emulation using legacy resolvers";
}
elsif( defined $Socket::GetAddrInfo::XS::VERSION ) {
   diag "Using native getaddrinfo(3) from XS";
}
else {
   diag "Using native getaddrinfo(3) from core";
}

# Also declare the contents of config.h
if( open my $configh, "<", "config.h" ) {
   my $config = do { local $/; <$configh> };
   diag "config.h is:\n---\n$config---";
}