changeset 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 8aede7babd9a
children bff287fbf347
files xslt.t
diffstat 1 files changed, 17 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/xslt.t
+++ b/xslt.t
@@ -21,7 +21,7 @@ use Test::Nginx;
 select STDERR; $| = 1;
 select STDOUT; $| = 1;
 
-my $t = Test::Nginx->new()->has(qw/http xslt/)->plan(6);
+my $t = Test::Nginx->new()->has(qw/http xslt/)->plan(8);
 
 $t->write_file_expand('nginx.conf', <<'EOF');
 
@@ -127,4 +127,20 @@ like(http_get("/x5"), qr!200 OK.*param1=
 
 }
 
+# xslt and ranges
+
+TODO: {
+local $TODO = 'not yet' unless $t->has_version('1.19.2');
+
+unlike(http_get("/x1"), qr!Accept-Ranges!, 'no Accept-Ranges');
+like(http(<<EOF), qr!200 OK.*test xslt result!ms, 'no ranges');
+GET /x1 HTTP/1.1
+Host: localhost
+Connection: close
+Range: bytes=-10
+
+EOF
+
+}
+
 ###############################################################################