comparison stream_js_buffer.t @ 1626:a35445ae8de7

Tests: adapted js buffer tests to renaming vars to rawVariables.
author Dmitry Volyntsev <xeioex@nginx.com>
date Thu, 26 Nov 2020 11:29:53 +0000
parents a140cab489e8
children d16310f0ada7
comparison
equal deleted inserted replaced
1625:a140cab489e8 1626:a35445ae8de7
97 function test_njs(r) { 97 function test_njs(r) {
98 r.return(200, njs.version); 98 r.return(200, njs.version);
99 } 99 }
100 100
101 function type(s) { 101 function type(s) {
102 var v = s.vars.remote_addr; 102 var v = s.rawVariables.remote_addr;
103 var type = Buffer.isBuffer(v) ? 'buffer' : (typeof v); 103 var type = Buffer.isBuffer(v) ? 'buffer' : (typeof v);
104 return type; 104 return type;
105 } 105 }
106 106
107 function binary_var(s) { 107 function binary_var(s) {
108 var test = s.vars.binary_remote_addr.equals(Buffer.from([127,0,0,1])); 108 var test = s.rawVariables
109 .binary_remote_addr.equals(Buffer.from([127,0,0,1]));
109 return test; 110 return test;
110 } 111 }
111 112
112 function cb_mismatch(s) { 113 function cb_mismatch(s) {
113 try { 114 try {