~ubuntu-branches/ubuntu/wily/libio-socket-ssl-perl/wily

« back to all changes in this revision

Viewing changes to t/02settings.t

  • Committer: Package Import Robot
  • Author(s): Sebastien Bacher
  • Date: 2014-01-17 11:28:23 UTC
  • mfrom: (41.1.2 trusty-proposed)
  • Revision ID: package-import@ubuntu.com-20140117112823-xemv5h0jdtms3oee
Tags: 1.965-1ubuntu1
* Resynchronize on Debian, remaining change
* Prefer the ipv6 alternatives for the recommendations.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Before `make install' is performed this script should be runnable with
2
 
# `make test'. After `make install' it should work as `perl t/02settings.t'
3
 
 
4
 
use IO::Socket::SSL;
5
 
eval {require "t/ssl_settings.req";} ||
6
 
eval {require "ssl_settings.req";};
7
 
use vars qw($SSL_SERVER_ADDR);
8
 
 
9
 
print "1..1\n";
10
 
 
11
 
$test=1;
12
 
my $server = IO::Socket::INET->new( 
13
 
    # pick any port on LocalAddr
14
 
    LocalAddr => $SSL_SERVER_ADDR,
15
 
    Listen => 1
16
 
);
17
 
 
18
 
if (!$server) {
19
 
    print "Bail out! ";
20
 
    print("Setup of test IO::Socket::INET server failed: $!.  All the rest of ",
21
 
        "the tests in this suite will fail also unless you change the values in ",
22
 
        "ssl_settings.req in the t/ directory.");
23
 
    exit;
24
 
}
25
 
 
26
 
print "ok $test\n";
27
 
close $server;