X-Git-Url: https://git.exim.org/users/heiko/exim.git/blobdiff_plain/fefe59d9280bc0b33fb9e1e89d0d664db8078542..a65c415633eb8753963ea6b42e0b3a8a0f2a1393:/test/t/00-basic.t diff --git a/test/t/00-basic.t b/test/t/00-basic.t index ae8eff77d..0612a20af 100644 --- a/test/t/00-basic.t +++ b/test/t/00-basic.t @@ -5,7 +5,7 @@ use Test::Exception; use lib 'lib'; use_ok 'Exim::Runtest', qw(:all) or BAIL_OUT 'Can not load the module'; -can_ok 'Exim::Runtest', qw(mailgroup dynamic_socket exim_binary); +can_ok 'Exim::Runtest', qw(mailgroup dynamic_socket exim_binary flavour flavours); pod_coverage_ok 'Exim::Runtest' => 'docs complete'; subtest 'mailgroup' => sub { @@ -39,4 +39,13 @@ subtest 'exim_binary' => sub { is_deeply [exim_binary(@argv2)], ["$cwd/t/samples/foo", @argv2[1,$#argv2]] => 'got the binary as rel path from argv'; }; +subtest 'flavour' => sub { + is flavour('t/samples/debian8+os-release/etc'), 'debian8' => 'got flavour debian8 from os-release'; + is flavour('t/samples/debian8+debian-version/etc'), 'debian8' => 'got flavour debian8 from debian_version'; + is flavour('t/samples/debian.sid/etc'), 'debian' => 'got flavour debian from debian sid w/o VERSION_ID'; + is flavour('t/samples/fedora24/etc'), 'fedora24' => 'got flavour fedora24 from os-release'; + is flavour('t/samples/empty'), undef() => 'got empty flavour (undef)'; + is_deeply [flavours()], ['debian8'] => 'got available flavours'; +}; + done_testing;