details: https://github.com/nginx/njs/commit/22b2300d9c1b86e29894fba5e32eaa73e678d11e branches: master commit: 22b2300d9c1b86e29894fba5e32eaa73e678d11e user: Dmitry Volyntsev <xei...@nginx.com> date: Wed, 17 Jul 2024 22:07:12 -0700 description: Tests: removed njs specific code from js_headers.t.
--- nginx/t/js_headers.t | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/nginx/t/js_headers.t b/nginx/t/js_headers.t index 787b5520..2cb8c660 100644 --- a/nginx/t/js_headers.t +++ b/nginx/t/js_headers.t @@ -388,12 +388,12 @@ $t->write_file('test.js', <<EOF); r.headersOut['Foo'] = 'xxx'; } - r.return(200, `B:\${njs.dump(r.headersOut.foo)}`); + r.return(200, `B:\${r.headersOut.foo}`); } function hdr_out_single(r) { r.headersOut.ETag = ['a', 'b']; - r.return(200, `B:\${njs.dump(r.headersOut.etag)}`); + r.return(200, `B:\${r.headersOut.etag}`); } function hdr_out_set_cookie(r) { @@ -403,7 +403,8 @@ $t->write_file('test.js', <<EOF); r.headersOut['Set-Cookie'] = 'e'; r.headersOut['Set-Cookie'] = ['c', '', null, 'd', 'f']; - r.return(200, `B:\${njs.dump(r.headersOut['Set-Cookie'])}`); + var cookies = r.headersOut['Set-Cookie']; + r.return(200, `B:\${cookies} \${Array.isArray(cookies)}`); } function ihdr_out(r) { @@ -519,7 +520,7 @@ like(http_get('/hdr_out_single'), qr/B:a/, 'r.headersOut single get'); like(http_get('/hdr_out_set_cookie'), qr/Set-Cookie: c\r\nSet-Cookie: d/, 'set_cookie'); -like(http_get('/hdr_out_set_cookie'), qr/B:\['c','d','f']/, +like(http_get('/hdr_out_set_cookie'), qr/B:c,d,f true/, 'set_cookie2'); unlike(http_get('/hdr_out_set_cookie'), qr/Set-Cookie: [abe]/, 'set_cookie3'); _______________________________________________ nginx-devel mailing list nginx-devel@nginx.org https://mailman.nginx.org/mailman/listinfo/nginx-devel