From: Heiko Schlittermann (HS12-RIPE) Date: Thu, 3 Nov 2016 08:36:25 +0000 (+0100) Subject: Testsuite: structure the testsuite test X-Git-Tag: exim-4_88_RC4~16 X-Git-Url: https://git.exim.org/users/jgh/exim.git/commitdiff_plain/b16852e23e1c477797bd7ce578a0f96bf341341c Testsuite: structure the testsuite test --- 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'; +};