comparison lib/Test/Nginx.pm @ 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 fca70f483608
children d73ab4b6ef4a
comparison
equal deleted inserted replaced
193:50063559d85a 194:5db96b64cead
117 117
118 sub has_daemon($) { 118 sub has_daemon($) {
119 my ($self, $daemon) = @_; 119 my ($self, $daemon) = @_;
120 120
121 Test::More::plan(skip_all => "$daemon not found") 121 Test::More::plan(skip_all => "$daemon not found")
122 unless `which $daemon`; 122 unless `command -v $daemon`;
123 123
124 return $self; 124 return $self;
125 } 125 }
126 126
127 sub plan($) { 127 sub plan($) {