From b16852e23e1c477797bd7ce578a0f96bf341341c Mon Sep 17 00:00:00 2001 From: "Heiko Schlittermann (HS12-RIPE)" Date: Thu, 3 Nov 2016 09:36:25 +0100 Subject: [PATCH] Testsuite: structure the testsuite test --- test/t/00-basic.t | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/test/t/00-basic.t b/test/t/00-basic.t index df7eab4de..a131b762f 100644 --- a/test/t/00-basic.t +++ b/test/t/00-basic.t @@ -1,18 +1,20 @@ use Test::More; use lib 'lib'; -use_ok 'Exim::Runtest'; +use_ok 'Exim::Runtest' or BAIL_OUT 'Can not load the module'; can_ok 'Exim::Runtest', qw(mailgroup); -my $group = getgrgid $(; -ok $group => 'got a group name'; -diag "use group $group"; +subtest 'mailgroup' => sub { + my $group = getgrgid $(; + ok $group => 'got a group name'; + diag "use group $group"; -is Exim::Runtest::mailgroup($group), $group => 'group names match'; -ok $group = Exim::Runtest::mailgroup('non existing group') => 'cope with unknown group'; -diag "got random group: $group"; + is Exim::Runtest::mailgroup($group), $group => 'group names match'; + ok $group = Exim::Runtest::mailgroup('non existing group') => 'cope with unknown group'; + diag "got random group: $group"; -ok getgrnam($group) => 'got an existing group'; + ok getgrnam($group) => 'got an existing group'; +}; -- 2.25.1