Mercurial > hg > nginx-tests
comparison xslt.t @ 1584:b4014b3e8495
Tests: added xslt filter tests with ranges.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Thu, 23 Jul 2020 12:16:41 +0300 |
parents | 829467f8d696 |
children | 5ac6efbe5552 |
comparison
equal
deleted
inserted
replaced
1583:8aede7babd9a | 1584:b4014b3e8495 |
---|---|
19 ############################################################################### | 19 ############################################################################### |
20 | 20 |
21 select STDERR; $| = 1; | 21 select STDERR; $| = 1; |
22 select STDOUT; $| = 1; | 22 select STDOUT; $| = 1; |
23 | 23 |
24 my $t = Test::Nginx->new()->has(qw/http xslt/)->plan(6); | 24 my $t = Test::Nginx->new()->has(qw/http xslt/)->plan(8); |
25 | 25 |
26 $t->write_file_expand('nginx.conf', <<'EOF'); | 26 $t->write_file_expand('nginx.conf', <<'EOF'); |
27 | 27 |
28 %%TEST_GLOBALS%% | 28 %%TEST_GLOBALS%% |
29 | 29 |
125 | 125 |
126 like(http_get("/x5"), qr!200 OK.*param1=localhost!ms, 'params variable'); | 126 like(http_get("/x5"), qr!200 OK.*param1=localhost!ms, 'params variable'); |
127 | 127 |
128 } | 128 } |
129 | 129 |
130 # xslt and ranges | |
131 | |
132 TODO: { | |
133 local $TODO = 'not yet' unless $t->has_version('1.19.2'); | |
134 | |
135 unlike(http_get("/x1"), qr!Accept-Ranges!, 'no Accept-Ranges'); | |
136 like(http(<<EOF), qr!200 OK.*test xslt result!ms, 'no ranges'); | |
137 GET /x1 HTTP/1.1 | |
138 Host: localhost | |
139 Connection: close | |
140 Range: bytes=-10 | |
141 | |
142 EOF | |
143 | |
144 } | |
145 | |
130 ############################################################################### | 146 ############################################################################### |