Mercurial > hg > nginx-tests
comparison perl.t @ 1693:5ac6efbe5552
Tests: removed TODO and try_run() checks for legacy versions.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Tue, 01 Jun 2021 16:40:18 +0300 |
parents | c2bbf805388d |
children | d7e019157cd7 |
comparison
equal
deleted
inserted
replaced
1692:f6795e2e6a4b | 1693:5ac6efbe5552 |
---|---|
194 . 'Host: localhost' . CRLF | 194 . 'Host: localhost' . CRLF |
195 . 'Range: bytes=0-1,3-5' . CRLF . CRLF | 195 . 'Range: bytes=0-1,3-5' . CRLF . CRLF |
196 ), qr/Content-Length: (?!42).*^xx\x0d.*^xxx\x0d/ms, | 196 ), qr/Content-Length: (?!42).*^xx\x0d.*^xxx\x0d/ms, |
197 'perl header_out content-length multipart'); | 197 'perl header_out content-length multipart'); |
198 | 198 |
199 TODO: { | |
200 local $TODO = 'not yet' unless $t->has_version('1.17.2'); | |
201 | |
202 like(http( | 199 like(http( |
203 'GET /range HTTP/1.0' . CRLF | 200 'GET /range HTTP/1.0' . CRLF |
204 . 'Host: localhost' . CRLF | 201 . 'Host: localhost' . CRLF |
205 . 'Range: bytes=100000-' . CRLF . CRLF | 202 . 'Range: bytes=100000-' . CRLF . CRLF |
206 ), qr|^\QHTTP/1.1 416\E.*(?!xxx)|ms, 'perl range not satisfiable'); | 203 ), qr|^\QHTTP/1.1 416\E.*(?!xxx)|ms, 'perl range not satisfiable'); |
207 | 204 |
208 } | |
209 | |
210 TODO: { | |
211 todo_skip 'leaves coredump', 1 unless $t->has_version('1.17.1') | |
212 or $ENV{TEST_NGINX_UNSAFE}; | |
213 | |
214 like(http( | 205 like(http( |
215 'GET / HTTP/1.0' . CRLF | 206 'GET / HTTP/1.0' . CRLF |
216 . 'Host: localhost' . CRLF | 207 . 'Host: localhost' . CRLF |
217 . 'If-Match: tt' . CRLF . CRLF | 208 . 'If-Match: tt' . CRLF . CRLF |
218 ), qr|200 OK|ms, 'perl precondition failed'); | 209 ), qr|200 OK|ms, 'perl precondition failed'); |
219 | |
220 } | |
221 | 210 |
222 # various request body tests | 211 # various request body tests |
223 | 212 |
224 like(http_get('/body'), qr/400 Bad Request/, 'perl no body'); | 213 like(http_get('/body'), qr/400 Bad Request/, 'perl no body'); |
225 | 214 |
285 . 'a' . CRLF | 274 . 'a' . CRLF |
286 . '1234567890' . CRLF | 275 . '1234567890' . CRLF |
287 . '0' . CRLF . CRLF | 276 . '0' . CRLF . CRLF |
288 ), qr/host: localhost/, 'perl body discard'); | 277 ), qr/host: localhost/, 'perl body discard'); |
289 | 278 |
290 TODO: { | |
291 local $TODO = 'not yet' unless $t->has_version('1.17.2'); | |
292 | |
293 like(http( | 279 like(http( |
294 'GET /discard HTTP/1.1' . CRLF | 280 'GET /discard HTTP/1.1' . CRLF |
295 . 'Host: localhost' . CRLF | 281 . 'Host: localhost' . CRLF |
296 . 'Connection: close' . CRLF | 282 . 'Connection: close' . CRLF |
297 . 'Transfer-Encoding: chunked' . CRLF . CRLF | 283 . 'Transfer-Encoding: chunked' . CRLF . CRLF |
308 . 'ak' . CRLF | 294 . 'ak' . CRLF |
309 . '1234567890' . CRLF | 295 . '1234567890' . CRLF |
310 . '0' . CRLF . CRLF | 296 . '0' . CRLF . CRLF |
311 ), qr/400 Bad Request/, 'perl body bad chunk'); | 297 ), qr/400 Bad Request/, 'perl body bad chunk'); |
312 | 298 |
313 } | 299 ############################################################################### |
314 | |
315 ############################################################################### |