Mercurial > hg > nginx-tests
comparison lib/Test/Nginx.pm @ 232:4c43b3a0117c
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.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Mon, 10 Sep 2012 19:55:12 +0400 |
parents | 5b7883daaf82 |
children | 90af19544dd2 |
comparison
equal
deleted
inserted
replaced
231:bc1861122d0c | 232:4c43b3a0117c |
---|---|
122 if ($^O eq 'MSWin32') { | 122 if ($^O eq 'MSWin32') { |
123 Test::More::plan(skip_all => "win32"); | 123 Test::More::plan(skip_all => "win32"); |
124 return $self; | 124 return $self; |
125 } | 125 } |
126 | 126 |
127 if ($^O eq 'solaris') { | |
128 Test::More::plan(skip_all => "$daemon not found") | |
129 unless `command -v $daemon`; | |
130 return $self; | |
131 } | |
132 | |
127 Test::More::plan(skip_all => "$daemon not found") | 133 Test::More::plan(skip_all => "$daemon not found") |
128 unless `command -v $daemon`; | 134 unless `which $daemon`; |
129 | 135 |
130 return $self; | 136 return $self; |
131 } | 137 } |
132 | 138 |
133 sub plan($) { | 139 sub plan($) { |