X-Git-Url: https://git.exim.org/users/heiko/exim.git/blobdiff_plain/87e93574a5da99b5f36751a4219caacc4e81ea3c..fefe59d9280bc0b33fb9e1e89d0d664db8078542:/test/t/00-basic.t?ds=sidebyside diff --git a/test/t/00-basic.t b/test/t/00-basic.t index 99a3e5fbd..ae8eff77d 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); +can_ok 'Exim::Runtest', qw(mailgroup dynamic_socket exim_binary); pod_coverage_ok 'Exim::Runtest' => 'docs complete'; subtest 'mailgroup' => sub { @@ -31,5 +31,12 @@ subtest 'dynamic_socket' => sub { $socket->close; }; +subtest 'exim_binary' => sub { + my @argv1 = qw(/bin/sh a b); + my @argv2 = qw(t/samples/foo a b); + chomp(my $cwd = `pwd`); # don't use Cwd, as we use Cwd in the tested module already + is_deeply [exim_binary(@argv1)], \@argv1 => 'got the binary as abs path from argv'; + is_deeply [exim_binary(@argv2)], ["$cwd/t/samples/foo", @argv2[1,$#argv2]] => 'got the binary as rel path from argv'; +}; done_testing;