summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeiko Schlittermann (HS12-RIPE) <hs@schlittermann.de>2016-11-03 09:36:25 +0100
committerHeiko Schlittermann (HS12-RIPE) <hs@schlittermann.de>2016-11-03 09:36:25 +0100
commitb16852e23e1c477797bd7ce578a0f96bf341341c (patch)
tree9d460153875d3b40cf31e1856630e94b0af9bd01
parentfcb0480dd8f8baa5a4c3488dba44529cca708cb1 (diff)
Testsuite: structure the testsuite test
-rw-r--r--test/t/00-basic.t18
1 files 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';
+};