diff options
author | Heiko Schlittermann (HS12-RIPE) <hs@schlittermann.de> | 2016-11-04 00:08:59 +0100 |
---|---|---|
committer | Heiko Schlittermann (HS12-RIPE) <hs@schlittermann.de> | 2016-11-04 08:20:38 +0100 |
commit | fefe59d9280bc0b33fb9e1e89d0d664db8078542 (patch) | |
tree | f4ac4d7a9636875144028c9bc0b5a8117a4aa8ed /test/t | |
parent | 87e93574a5da99b5f36751a4219caacc4e81ea3c (diff) |
Introduce EXIM_BUILD_SUFFIX for src/Makefile and testsuite
This enables parallel builds in a shared directory, if they have
the same os-type and arch-type. Think about EXIM_BUILD_SUFFIX
as 'name of your linux distro'
Diffstat (limited to 'test/t')
-rw-r--r-- | test/t/00-basic.t | 9 | ||||
-rwxr-xr-x | test/t/samples/foo | 2 | ||||
-rw-r--r-- | test/t/samples/src/.directory | 0 |
3 files changed, 10 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; diff --git a/test/t/samples/foo b/test/t/samples/foo new file mode 100755 index 000000000..0e748db3f --- /dev/null +++ b/test/t/samples/foo @@ -0,0 +1,2 @@ +# this file solely exists to be tested as +# an executable from one of the tests in t/ diff --git a/test/t/samples/src/.directory b/test/t/samples/src/.directory new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/test/t/samples/src/.directory |