# HG changeset patch # User Maxim Dounin # Date 1326220122 -14400 # Node ID 5db96b64ceadd369281600ccfbcbb6409ffae9ed # Parent 50063559d85a0476481338453f42ae88079bc2b1 Tests: replace "which" with "command -v". Under Solaris "which" is totally unusable (it prints garbage to stdout, and doesn't set return code). POSIX's "command -v" seems to work ok on all supported systems. diff --git a/lib/Test/Nginx.pm b/lib/Test/Nginx.pm --- a/lib/Test/Nginx.pm +++ b/lib/Test/Nginx.pm @@ -119,7 +119,7 @@ sub has_daemon($) { my ($self, $daemon) = @_; Test::More::plan(skip_all => "$daemon not found") - unless `which $daemon`; + unless `command -v $daemon`; return $self; }