Mercurial > hg > nginx-tests
changeset 1493:829467f8d696
Tests: xslt_stylesheet parameter from variable.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Thu, 18 Jul 2019 19:11:55 +0300 |
parents | 760fdf2865bb |
children | 1356e7374c57 |
files | xslt.t |
diffstat | 1 files changed, 14 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/xslt.t Wed Jul 17 15:59:08 2019 +0300 +++ b/xslt.t Thu Jul 18 19:11:55 2019 +0300 @@ -21,7 +21,7 @@ select STDERR; $| = 1; select STDOUT; $| = 1; -my $t = Test::Nginx->new()->has(qw/http xslt/)->plan(5); +my $t = Test::Nginx->new()->has(qw/http xslt/)->plan(6); $t->write_file_expand('nginx.conf', <<'EOF'); @@ -56,6 +56,10 @@ xslt_stylesheet %%TESTDIR%%/first.xslt; xslt_stylesheet %%TESTDIR%%/test.xslt; } + location /x5 { + xslt_stylesheet %%TESTDIR%%/test.xslt + param1='$server_name'; + } } } @@ -102,6 +106,7 @@ $t->write_file('x2', '<root>data</root>'); $t->write_file('x3', '<!DOCTYPE root><root>&test;</root>'); $t->write_file('x4', '<root>data</root>'); +$t->write_file('x5', '<root>data</root>'); $t->run(); @@ -114,4 +119,12 @@ like(http_get("/x3"), qr!200 OK.*data=test entity!ms, 'entities'); like(http_get("/x4"), qr!200 OK.*data=other data!ms, 'several stylesheets'); +TODO: { +todo_skip 'heap-buffer-overflow', 1 unless $t->has_version('1.17.2') + or $ENV{TEST_NGINX_UNSAFE}; + +like(http_get("/x5"), qr!200 OK.*param1=localhost!ms, 'params variable'); + +} + ###############################################################################