Mercurial > hg > nginx-tests
changeset 223:f9325406df0b
Tests: skip tests not appropriate for win32.
Skip tests which doesn't work on win32, notably ones using crypt(),
symlinks and shared memory.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Sun, 03 Jun 2012 05:20:39 +0400 |
parents | 5b7883daaf82 |
children | ba992cfdc606 |
files | auth_basic.t autoindex.t http_server_name.t limit_req.t proxy_cache.t proxy_cache_lock.t proxy_merge_headers.t random_index.t ssi.t |
diffstat | 9 files changed, 22 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/auth_basic.t Sun Jun 03 04:56:14 2012 +0400 +++ b/auth_basic.t Sun Jun 03 05:20:39 2012 +0400 @@ -68,12 +68,18 @@ like(http_get('/'), qr!401 Unauthorized!ms, 'rejects unathorized'); +SKIP: { + +skip 'no crypt on win32', 4 if $^O eq 'MSWin32'; + like(http_get_auth('/', 'crypt', 'password'), qr!SEETHIS!, 'normal crypt'); unlike(http_get_auth('/', 'crypt', '123'), qr!SEETHIS!, 'normal wrong'); like(http_get_auth('/', 'crypt1', 'password'), qr!SEETHIS!, 'crypt $1$ (md5)'); unlike(http_get_auth('/', 'crypt1', '123'), qr!SEETHIS!, 'crypt $1$ wrong'); +} + like(http_get_auth('/', 'apr1', 'password'), qr!SEETHIS!, 'apr1 md5'); like(http_get_auth('/', 'plain', 'password'), qr!SEETHIS!, 'plain password');
--- a/autoindex.t Sun Jun 03 04:56:14 2012 +0400 +++ b/autoindex.t Sun Jun 03 05:20:39 2012 +0400 @@ -21,6 +21,8 @@ select STDERR; $| = 1; select STDOUT; $| = 1; +plan(skip_all => 'no symlinks on win32') if $^O eq 'MSWin32'; + my $t = Test::Nginx->new()->has(qw/http autoindex/)->plan(16) ->write_file_expand('nginx.conf', <<'EOF');
--- a/http_server_name.t Sun Jun 03 04:56:14 2012 +0400 +++ b/http_server_name.t Sun Jun 03 05:20:39 2012 +0400 @@ -21,6 +21,8 @@ select STDERR; $| = 1; select STDOUT; $| = 1; +plan(skip_all => 'win32') if $^O eq 'MSWin32'; + my $t = Test::Nginx->new()->has(qw/http rewrite/)->plan(9) ->write_file_expand('nginx.conf', <<'EOF');
--- a/limit_req.t Sun Jun 03 04:56:14 2012 +0400 +++ b/limit_req.t Sun Jun 03 05:20:39 2012 +0400 @@ -21,6 +21,8 @@ select STDERR; $| = 1; select STDOUT; $| = 1; +plan(skip_all => 'win32') if $^O eq 'MSWin32'; + my $t = Test::Nginx->new()->has(qw/http limit_req/)->plan(5); $t->write_file_expand('nginx.conf', <<'EOF');
--- a/proxy_cache.t Sun Jun 03 04:56:14 2012 +0400 +++ b/proxy_cache.t Sun Jun 03 05:20:39 2012 +0400 @@ -21,6 +21,8 @@ select STDERR; $| = 1; select STDOUT; $| = 1; +plan(skip_all => 'win32') if $^O eq 'MSWin32'; + my $t = Test::Nginx->new()->has(qw/http proxy cache gzip/)->plan(12) ->write_file_expand('nginx.conf', <<'EOF');
--- a/proxy_cache_lock.t Sun Jun 03 04:56:14 2012 +0400 +++ b/proxy_cache_lock.t Sun Jun 03 05:20:39 2012 +0400 @@ -22,6 +22,8 @@ select STDERR; $| = 1; select STDOUT; $| = 1; +plan(skip_all => 'win32') if $^O eq 'MSWin32'; + my $t = Test::Nginx->new()->has(qw/http proxy cache/) ->write_file_expand('nginx.conf', <<'EOF');
--- a/proxy_merge_headers.t Sun Jun 03 04:56:14 2012 +0400 +++ b/proxy_merge_headers.t Sun Jun 03 05:20:39 2012 +0400 @@ -21,6 +21,8 @@ select STDERR; $| = 1; select STDOUT; $| = 1; +plan(skip_all => 'win32') if $^O eq 'MSWin32'; + my $t = Test::Nginx->new()->has(qw/http proxy cache rewrite/)->plan(3) ->write_file_expand('nginx.conf', <<'EOF');
--- a/random_index.t Sun Jun 03 04:56:14 2012 +0400 +++ b/random_index.t Sun Jun 03 05:20:39 2012 +0400 @@ -21,6 +21,8 @@ select STDERR; $| = 1; select STDOUT; $| = 1; +plan(skip_all => 'no symlinks on win32') if $^O eq 'MSWin32'; + my $t = Test::Nginx->new()->has(qw/http random_index/)->plan(1) ->write_file_expand('nginx.conf', <<'EOF');
--- a/ssi.t Sun Jun 03 04:56:14 2012 +0400 +++ b/ssi.t Sun Jun 03 05:20:39 2012 +0400 @@ -21,6 +21,8 @@ select STDERR; $| = 1; select STDOUT; $| = 1; +plan(skip_all => 'win32') if $^O eq 'MSWin32'; + my $t = Test::Nginx->new()->has(qw/http ssi cache proxy rewrite/)->plan(18); $t->write_file_expand('nginx.conf', <<'EOF');