Mercurial > hg > nginx-tests
diff xslt_params.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 | 6a0d934950bc |
children | 847ea345becb |
line wrap: on
line diff
--- a/xslt_params.t +++ b/xslt_params.t @@ -86,14 +86,7 @@ EOF $t->write_file('x2', '<root>data</root>'); $t->write_file('x3', '<root>data</root>'); -eval { - open OLDERR, ">&", \*STDERR; close STDERR; - $t->run(); - open STDERR, ">&", \*OLDERR; -}; - -plan(skip_all => 'no xslt_param') if $@; -$t->plan(3); +$t->try_run('no xslt_param')->plan(3); ###############################################################################