Mercurial > hg > nginx-tests
comparison stream_js.t @ 1544:53ed2231403b
Tests: js TODO adjusted.
author | Dmitry Volyntsev <xeioex@nginx.com> |
---|---|
date | Thu, 16 Jan 2020 19:15:25 +0300 |
parents | 2e81f7788cf7 |
children | f3ba4c74de31 |
comparison
equal
deleted
inserted
replaced
1543:0b97d431571f | 1544:53ed2231403b |
---|---|
365 is(stream('127.0.0.1:' . port(8082))->read(), 'variable=127.0.0.1', | 365 is(stream('127.0.0.1:' . port(8082))->read(), 'variable=127.0.0.1', |
366 's.variables'); | 366 's.variables'); |
367 is(stream('127.0.0.1:' . port(8083))->read(), '', 'stream js unknown function'); | 367 is(stream('127.0.0.1:' . port(8083))->read(), '', 'stream js unknown function'); |
368 is(stream('127.0.0.1:' . port(8084))->read(), 'sess_unk=undefined', 's.unk'); | 368 is(stream('127.0.0.1:' . port(8084))->read(), 'sess_unk=undefined', 's.unk'); |
369 | 369 |
370 TODO: { | |
371 local $TODO = 'not yet' | |
372 unless get('/njs') =~ /^([.0-9]+)$/m && $1 ge '0.2.4'; | |
373 | |
374 is(stream('127.0.0.1:' . port(8086))->io('0'), '0122345', | 370 is(stream('127.0.0.1:' . port(8086))->io('0'), '0122345', |
375 'async handlers order'); | 371 'async handlers order'); |
376 is(stream('127.0.0.1:' . port(8087))->io('#'), 'OK', 'js_access_undecided'); | 372 is(stream('127.0.0.1:' . port(8087))->io('#'), 'OK', 'js_access_undecided'); |
377 is(stream('127.0.0.1:' . port(8088))->io('#'), 'OK', 'js_access_allow'); | 373 is(stream('127.0.0.1:' . port(8088))->io('#'), 'OK', 'js_access_allow'); |
378 is(stream('127.0.0.1:' . port(8089))->io('#'), '', 'js_access_deny'); | 374 is(stream('127.0.0.1:' . port(8089))->io('#'), '', 'js_access_deny'); |
382 is(stream('127.0.0.1:' . port(8093))->io("xy\na"), 'xy', 'js_preread_req_line'); | 378 is(stream('127.0.0.1:' . port(8093))->io("xy\na"), 'xy', 'js_preread_req_line'); |
383 | 379 |
384 is(stream('127.0.0.1:' . port(8094))->io('x'), 'x', 'js_filter_empty'); | 380 is(stream('127.0.0.1:' . port(8094))->io('x'), 'x', 'js_filter_empty'); |
385 like(get('/p/return'), qr/foo/, 'js_filter_injected_header'); | 381 like(get('/p/return'), qr/foo/, 'js_filter_injected_header'); |
386 is(stream('127.0.0.1:' . port(8096))->io('x'), 'z', 'js_filter_search'); | 382 is(stream('127.0.0.1:' . port(8096))->io('x'), 'z', 'js_filter_search'); |
387 | |
388 } | |
389 | 383 |
390 stream('127.0.0.1:' . port(8097))->io('x'); | 384 stream('127.0.0.1:' . port(8097))->io('x'); |
391 stream('127.0.0.1:' . port(8098))->io('x'); | 385 stream('127.0.0.1:' . port(8098))->io('x'); |
392 stream('127.0.0.1:' . port(8099))->io('x'); | 386 stream('127.0.0.1:' . port(8099))->io('x'); |
393 | 387 |