Mercurial > hg > nginx-tests
diff fastcgi_buffering.t @ 392:c28ecaef065f
Tests: try_run() introduced.
This method replaces multiple ad-hoc solutions to grecefully skip tests if
nginx startup fails, e.g., due to no support for a particular directive.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Fri, 18 Apr 2014 18:36:26 +0400 |
parents | 8f0010dc4b09 |
children | 847ea345becb |
line wrap: on
line diff
--- a/fastcgi_buffering.t +++ b/fastcgi_buffering.t @@ -62,16 +62,9 @@ EOF '<!--#include virtual="/include$request_uri" set="x" -->' . 'set: <!--#echo var="x" -->'); -eval { - open OLDERR, ">&", \*STDERR; close STDERR; - $t->run(); - open STDERR, ">&", \*OLDERR; -}; -plan(skip_all => 'no fastcgi_buffering') if $@; +$t->try_run('no fastcgi_buffering')->plan(2); -$t->run_daemon(\&fastcgi_daemon); - -$t->plan(2)->waitforsocket('127.0.0.1:8081'); +$t->run_daemon(\&fastcgi_daemon)->waitforsocket('127.0.0.1:8081'); ###############################################################################