Mercurial > hg > nginx-tests
changeset 1455:558d3d9a000c
Tests: adapted js.t to njs changes.
author | Dmitry Volyntsev <xeioex@nginx.com> |
---|---|
date | Tue, 26 Mar 2019 15:43:10 +0300 |
parents | 3008cc57b5c9 |
children | f4ae08adc23f |
files | js.t |
diffstat | 1 files changed, 13 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/js.t +++ b/js.t @@ -232,7 +232,7 @@ EOF EOF -$t->try_run('no njs available')->plan(23); +$t->try_run('no njs available')->plan(26); ############################################################################### @@ -244,6 +244,18 @@ like(http_get('/uri'), qr/uri=\/uri/, 'r like(http_get('/arg?foO=12345'), qr/arg=12345/, 'r.args'); like(http_get('/iarg?foo=12345&foo2=bar&nn=22&foo-3=z'), qr/12345barz/, 'r.args iteration'); + +TODO: { +local $TODO = 'not yet' + unless http_get('/njs') =~ /^([.0-9]+)$/m && $1 ge '0.3.0'; + +like(http_get('/iarg?foo=123&foo2=&foo3&foo4=456'), qr/123undefined456/, + 'r.args iteration 2'); +like(http_get('/iarg?foo=123&foo2=&foo3'), qr/123/, 'r.args iteration 3'); +like(http_get('/iarg?foo=123&foo2='), qr/123/, 'r.args iteration 4'); + +} + like(http_get('/status'), qr/204 No Content/, 'r.status'); like(http_post('/body'), qr/REQ-BODY/, 'request body');