Mercurial > hg > nginx-tests
diff proxy_cache_revalidate.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 | fb366c51eac6 |
children | 847ea345becb |
line wrap: on
line diff
--- a/proxy_cache_revalidate.t +++ b/proxy_cache_revalidate.t @@ -67,13 +67,7 @@ EOF $t->write_file('t', 'SEE-THIS'); $t->write_file('t2', 'SEE-THIS'); -eval { - open OLDERR, ">&", \*STDERR; close STDERR; - $t->run(); - open STDERR, ">&", \*OLDERR; -}; -plan(skip_all => 'no proxy_cache_revalidate') if $@; -$t->plan(9); +$t->try_run('no proxy_cache_revalidate')->plan(9); ###############################################################################