# HG changeset patch # User Dmitry Volyntsev # Date 1571157385 -10800 # Node ID 9521130f6f222a20f042ef720855b3f3f7baa3ae # Parent 787d904bdfe0388f6b4944aa1260f653b18ab92b Tests: js TODO adjusted. diff --git a/js.t b/js.t --- a/js.t +++ b/js.t @@ -245,17 +245,11 @@ like(http_get('/arg?foO=12345'), qr/arg= 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'); diff --git a/js_headers.t b/js_headers.t --- a/js_headers.t +++ b/js_headers.t @@ -185,11 +185,6 @@ EOF ############################################################################### - -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 @@ like(http_get('/hdr_out?foo=123&bar=copy 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'); -} ############################################################################### diff --git a/js_internal_redirect.t b/js_internal_redirect.t --- a/js_internal_redirect.t +++ b/js_internal_redirect.t @@ -87,14 +87,8 @@ EOF ############################################################################### -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'); -} - ############################################################################### diff --git a/js_request_body.t b/js_request_body.t --- a/js_request_body.t +++ b/js_request_body.t @@ -81,15 +81,11 @@ EOF ############################################################################### -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'); -} ############################################################################### diff --git a/js_return.t b/js_return.t --- a/js_return.t +++ b/js_return.t @@ -77,7 +77,7 @@ like(http_get('/?c=404'), qr/404 Not.*ht 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'); diff --git a/js_subrequests.t b/js_subrequests.t --- a/js_subrequests.t +++ b/js_subrequests.t @@ -526,23 +526,14 @@ http_get('/sr_except_failed_to_convert_a 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, diff --git a/js_variables.t b/js_variables.t --- a/js_variables.t +++ b/js_variables.t @@ -94,14 +94,8 @@ EOF ############################################################################### -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'); -} - ###############################################################################