diff debug_connection.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 ad51e58c2d7a
children 847ea345becb
line wrap: on
line diff
--- a/debug_connection.t
+++ b/debug_connection.t
@@ -54,14 +54,7 @@ http {
 
 EOF
 
-eval {
-	open OLDERR, ">&", \*STDERR; close STDERR;
-	$t->run();
-	open STDERR, ">&", \*OLDERR;
-};
-plan(skip_all => 'no inet6 support') if $@;
-
-$t->plan(5);
+$t->try_run('no inet6 support')->plan(5);
 
 ###############################################################################