File: 02settings.t

package info (click to toggle)
libio-socket-ssl-perl 1.33-1%2Bsqueeze1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 364 kB
  • ctags: 100
  • sloc: perl: 2,998; makefile: 2
file content (27 lines) | stat: -rw-r--r-- 718 bytes parent folder | download | duplicates (3)
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
27
# Before `make install' is performed this script should be runnable with
# `make test'. After `make install' it should work as `perl t/02settings.t'

use IO::Socket::SSL;
eval {require "t/ssl_settings.req";} ||
eval {require "ssl_settings.req";};
use vars qw($SSL_SERVER_ADDR);

print "1..1\n";

$test=1;
my $server = IO::Socket::INET->new( 
    # pick any port on LocalAddr
    LocalAddr => $SSL_SERVER_ADDR,
    Listen => 1
);

if (!$server) {
    print "Bail out! ";
    print("Setup of test IO::Socket::INET server failed: $!.  All the rest of ",
	"the tests in this suite will fail also unless you change the values in ",
	"ssl_settings.req in the t/ directory.");
    exit;
}

print "ok $test\n";
close $server;