changeset 292:2da774b0fc7d

Tests: skip access.t on platforms without ipv6 support.
author Sergey Kandaurov <pluknet@nginx.com>
date Fri, 31 May 2013 20:26:31 +0400
parents 03d5be12bc3b
children 719285b89d7e
files access.t
diffstat 1 files changed, 9 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/access.t	Fri May 31 14:07:15 2013 +0400
+++ b/access.t	Fri May 31 20:26:31 2013 +0400
@@ -26,9 +26,8 @@
 my $t = Test::Nginx->new()->has(qw/http proxy access ipv6/);
 
 plan(skip_all => 'new syntax "unix:"') unless $t->has_version('1.5.1');
-plan(skip_all => 'win32') if $^O eq 'MSWin32';
 
-$t->plan(12)->write_file_expand('nginx.conf', <<'EOF');
+$t->write_file_expand('nginx.conf', <<'EOF');
 
 %%TEST_GLOBALS%%
 
@@ -83,7 +82,14 @@
 
 EOF
 
-$t->run();
+eval {
+	open OLDERR, ">&", \*STDERR; close STDERR;
+	$t->run();
+	open STDERR, ">&", \*OLDERR;
+};
+plan(skip_all => 'no inet6 and/or unix support') if $@;
+
+$t->plan(12);
 
 ###############################################################################