comparison perl.t @ 1487:fe0765147e15

Tests: perl and conditional requests processing.
author Sergey Kandaurov <pluknet@nginx.com>
date Wed, 19 Jun 2019 15:07:29 +0300
parents a69de1aba1ad
children 82be9398a9fa
comparison
equal deleted inserted replaced
1486:723c7e08eec7 1487:fe0765147e15
21 ############################################################################### 21 ###############################################################################
22 22
23 select STDERR; $| = 1; 23 select STDERR; $| = 1;
24 select STDOUT; $| = 1; 24 select STDOUT; $| = 1;
25 25
26 my $t = Test::Nginx->new()->has(qw/http perl rewrite/)->plan(17) 26 my $t = Test::Nginx->new()->has(qw/http perl rewrite/)->plan(18)
27 ->write_file_expand('nginx.conf', <<'EOF'); 27 ->write_file_expand('nginx.conf', <<'EOF');
28 28
29 %%TEST_GLOBALS%% 29 %%TEST_GLOBALS%%
30 30
31 daemon off; 31 daemon off;
182 . 'Range: bytes=100000-' . CRLF . CRLF 182 . 'Range: bytes=100000-' . CRLF . CRLF
183 ), qr|^\QHTTP/1.1 416\E.*(?!xxx)|ms, 'perl range not satisfiable'); 183 ), qr|^\QHTTP/1.1 416\E.*(?!xxx)|ms, 'perl range not satisfiable');
184 184
185 } 185 }
186 186
187 TODO: {
188 todo_skip 'leaves coredump', 1 unless $t->has_version('1.17.1')
189 or $ENV{TEST_NGINX_UNSAFE};
190
191 like(http(
192 'GET / HTTP/1.0' . CRLF
193 . 'Host: localhost' . CRLF
194 . 'If-Match: tt' . CRLF . CRLF
195 ), qr|200 OK|ms, 'perl precondition failed');
196
197 }
198
187 # various request body tests 199 # various request body tests
188 200
189 like(http( 201 like(http(
190 'GET /body HTTP/1.0' . CRLF 202 'GET /body HTTP/1.0' . CRLF
191 . 'Host: localhost' . CRLF 203 . 'Host: localhost' . CRLF