summaryrefslogtreecommitdiff
path: root/test/t/00-basic.t
diff options
context:
space:
mode:
Diffstat (limited to 'test/t/00-basic.t')
-rw-r--r--test/t/00-basic.t9
1 files changed, 8 insertions, 1 deletions
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;