changeset 194:5db96b64cead

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.
author Maxim Dounin <mdounin@mdounin.ru>
date Tue, 10 Jan 2012 22:28:42 +0400
parents 50063559d85a
children d73ab4b6ef4a
files lib/Test/Nginx.pm
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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;
 }