# HG changeset patch # User Maxim Dounin # Date 1347292512 -14400 # Node ID 4c43b3a0117c61561866d887c7beb81a0b0d48da # Parent bc1861122d0c13164645e18704c7576fa7d1971f Tests: revert 5db96b64cead, use "which" instead of "command -v". It turns out that Linux doesn't have "command -v" (there are shell builtins, but no standalone binary). Use "which" instead, and provide a special case for Solaris. diff --git a/lib/Test/Nginx.pm b/lib/Test/Nginx.pm --- a/lib/Test/Nginx.pm +++ b/lib/Test/Nginx.pm @@ -124,8 +124,14 @@ sub has_daemon($) { return $self; } + if ($^O eq 'solaris') { + Test::More::plan(skip_all => "$daemon not found") + unless `command -v $daemon`; + return $self; + } + Test::More::plan(skip_all => "$daemon not found") - unless `command -v $daemon`; + unless `which $daemon`; return $self; }