From: Eric Wong Date: Tue, 8 Apr 2014 07:37:50 +0000 (+0000) Subject: t/all: IPC::Run is optional in tests X-Git-Tag: v0.0.0~22 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=a4f20bd4a049fea95268bd80e8fb673a8ca24ff0;p=ssoma-mda.git t/all: IPC::Run is optional in tests We do not force users to install libraries only needed for testing. --- diff --git a/t/all.t b/t/all.t index 9698c8e..27fe6c1 100644 --- a/t/all.t +++ b/t/all.t @@ -11,7 +11,11 @@ my $rm = "blib/script/ssoma-rm"; my $tmp = tempdir(CLEANUP => 1); use File::Temp qw/tempdir/; use Email::Simple; -use IPC::Run qw(run); +my $have_ipc_run = eval { + require IC::Run; + import IPC::Run qw/run/; + 1; +}; ok(-x $mda, "$mda is executable"); ok(-x $cli, "$cli is executable"); @@ -197,7 +201,8 @@ EOF } # duplicate detection -{ +SKIP: { + skip "IPC::Run not available", 2 unless $have_ipc_run; my $simple = Email::Simple->new(<<'EOF'); From: moi@example.com To: you@example.com