Mercurial > hg > nginx-tests
changeset 1520:9521130f6f22
Tests: js TODO adjusted.
author | Dmitry Volyntsev <xeioex@nginx.com> |
---|---|
date | Tue, 15 Oct 2019 19:36:25 +0300 |
parents | 787d904bdfe0 |
children | b6699ffd9ddd |
files | js.t js_headers.t js_internal_redirect.t js_request_body.t js_return.t js_subrequests.t js_variables.t |
diffstat | 7 files changed, 1 insertions(+), 38 deletions(-) [+] |
line wrap: on
line diff
--- a/js.t Thu Oct 10 18:15:02 2019 +0300 +++ b/js.t Tue Oct 15 19:36:25 2019 +0300 @@ -245,17 +245,11 @@ 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');
--- a/js_headers.t Thu Oct 10 18:15:02 2019 +0300 +++ b/js_headers.t Tue Oct 15 19:36:25 2019 +0300 @@ -185,11 +185,6 @@ ############################################################################### - -TODO: { -local $TODO = 'not yet' - unless http_get('/njs') =~ /^([.0-9]+)$/m && $1 ge '0.2.8'; - like(http_get('/content_length'), qr/Content-Length: 3/, 'set Content-Length'); like(http_get('/content_type'), qr/Content-Type: text\/xml; charset="utf-8"\r/, @@ -207,6 +202,5 @@ unlike(http_get('/hdr_out?bar=empty'), qr/Bar:/, 'r.headersOut empty'); unlike(http_get('/hdr_out?foo='), qr/Foo:/, 'r.headersOut no value'); unlike(http_get('/hdr_out?foo'), qr/Foo:/, 'r.headersOut no value 2'); -} ###############################################################################
--- a/js_internal_redirect.t Thu Oct 10 18:15:02 2019 +0300 +++ b/js_internal_redirect.t Tue Oct 15 19:36:25 2019 +0300 @@ -87,14 +87,8 @@ ############################################################################### -TODO: { -local $TODO = 'no njs internalRedirect' - unless http_get('/njs') =~ /^([.0-9]+)$/m && $1 ge '0.2.2'; - like(http_get('/test'), qr/redirect/s, 'redirect'); like(http_get('/test?a=A'), qr/redirectA/s, 'redirect with args'); like(http_get('/test?dest=named'), qr/named/s, 'redirect to named location'); -} - ###############################################################################
--- a/js_request_body.t Thu Oct 10 18:15:02 2019 +0300 +++ b/js_request_body.t Tue Oct 15 19:36:25 2019 +0300 @@ -81,15 +81,11 @@ ############################################################################### -TODO: { -local $TODO = 'deprecated api' - unless http_get('/njs') =~ /^([.0-9]+)$/m && $1 ge '0.2.2'; like(http_post('/body'), qr/REQ-BODY/, 'request body'); like(http_post('/in_file'), qr/request body is in a file/, 'request body in file'); like(http_post_big('/body'), qr/200.*^(1234567890){1024}$/ms, 'request body big'); -} ###############################################################################
--- a/js_return.t Thu Oct 10 18:15:02 2019 +0300 +++ b/js_return.t Tue Oct 15 19:36:25 2019 +0300 @@ -77,7 +77,7 @@ TODO: { my ($v) = http_get('/njs') =~ /^([.0-9]+)$/m; -local $TODO = 'not yet' unless $v ge '0.2.1' or $Config{archname} !~ /aarch64/; +local $TODO = 'not yet' unless $Config{archname} !~ /aarch64/; like(http_get('/?c=inv'), qr/ 500 /, 'return invalid');
--- a/js_subrequests.t Thu Oct 10 18:15:02 2019 +0300 +++ b/js_subrequests.t Tue Oct 15 19:36:25 2019 +0300 @@ -526,23 +526,14 @@ http_get('/sr_except_failed_to_convert_options_arg'); http_get('/sr_uri_except'); -TODO: { -local $TODO = 'not yet' - unless http_get('/njs') =~ /^([.0-9]+)$/m && $1 ge '0.2.4'; - is(get_json('/sr_js_in_sr_parent'), '{"e":"parent can only be returned for a subrequest"}', 'parent in subrequest js_content'); -todo_skip 'leaves coredump', 1 - unless http_get('/njs') =~ /^([.0-9]+)$/m && $1 ge '0.2.4'; - is(get_json('/sr_in_sr_callback'), '{"e":"subrequest can only be created for the primary request"}', 'subrequest for non-primary request'); -} - $t->stop(); ok(index($t->read_file('error.log'), 'callback is not a function') > 0,
--- a/js_variables.t Thu Oct 10 18:15:02 2019 +0300 +++ b/js_variables.t Tue Oct 15 19:36:25 2019 +0300 @@ -94,14 +94,8 @@ ############################################################################### -TODO: { -local $TODO = 'not yet' - unless http_get('/njs') =~ /^([.0-9]+)$/m && $1 ge '0.2.8'; - like(http_get('/var_set?a=bar'), qr/test_varbar/, 'var set'); like(http_get('/content_set?a=bar'), qr/bar/, 'content set'); like(http_get('/not_found_set'), qr/variable not found/, 'not found exception'); -} - ###############################################################################