Mercurial > hg > nginx-tests
changeset 658:b9eb462d8973
Tests: added try_files test for alias with nested location.
author | Andrey Zelenkov <zelenkov@nginx.com> |
---|---|
date | Fri, 21 Aug 2015 15:59:05 +0300 |
parents | 68a95e3195f1 |
children | f3b5bee3a14e |
files | http_try_files.t |
diffstat | 1 files changed, 16 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/http_try_files.t Thu Aug 20 20:07:47 2015 +0300 +++ b/http_try_files.t Fri Aug 21 15:59:05 2015 +0300 @@ -21,7 +21,7 @@ select STDERR; $| = 1; select STDOUT; $| = 1; -my $t = Test::Nginx->new()->has(qw/http proxy rewrite/)->plan(9) +my $t = Test::Nginx->new()->has(qw/http proxy rewrite/)->plan(10) ->write_file_expand('nginx.conf', <<'EOF'); %%TEST_GLOBALS%% @@ -71,6 +71,13 @@ try_files $uri =404; } + location /alias-nested/ { + alias %%TESTDIR%%/; + location ~ html { + try_files $uri =404; + } + } + location /fallback { proxy_pass http://127.0.0.1:8081/fallback; } @@ -117,4 +124,12 @@ } +TODO: { +local $TODO = 'not yet' unless $t->has_version('1.9.4'); + +like(http_get('/alias-nested/found.html'), qr!SEE THIS!, + 'alias with nested location'); + +} + ###############################################################################