From b369d47038a075706f6dfe57ab2e1ebeea0e5bdf Mon Sep 17 00:00:00 2001 From: "Heiko Schlittermann (HS12-RIPE)" Date: Thu, 3 Nov 2016 09:37:02 +0100 Subject: Testsuite: move dynamic_socket to Exim::Runtest --- test/t/00-basic.t | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'test/t') diff --git a/test/t/00-basic.t b/test/t/00-basic.t index a131b762f..3d5503a08 100644 --- a/test/t/00-basic.t +++ b/test/t/00-basic.t @@ -2,7 +2,7 @@ use Test::More; use lib 'lib'; use_ok 'Exim::Runtest' or BAIL_OUT 'Can not load the module'; -can_ok 'Exim::Runtest', qw(mailgroup); +can_ok 'Exim::Runtest', qw(mailgroup dynamic_socket); subtest 'mailgroup' => sub { my $group = getgrgid $(; @@ -16,6 +16,12 @@ subtest 'mailgroup' => sub { ok getgrnam($group) => 'got an existing group'; }; +subtest 'dynamic_socket' => sub { + ok my $socket = Exim::Runtest::dynamic_socket() => 'got a socket'; + diag "got socket on port @{[$socket->sockport]}"; + isa_ok $socket => 'IO::Socket::INET'; + $socket->close; +}; done_testing; -- cgit v1.2.3