comparison js_headers.t @ 1520:9521130f6f22

Tests: js TODO adjusted.
author Dmitry Volyntsev <xeioex@nginx.com>
date Tue, 15 Oct 2019 19:36:25 +0300
parents 1220f0055135
children b6699ffd9ddd
comparison
equal deleted inserted replaced
1519:787d904bdfe0 1520:9521130f6f22
182 EOF 182 EOF
183 183
184 $t->try_run('no njs')->plan(12); 184 $t->try_run('no njs')->plan(12);
185 185
186 ############################################################################### 186 ###############################################################################
187
188
189 TODO: {
190 local $TODO = 'not yet'
191 unless http_get('/njs') =~ /^([.0-9]+)$/m && $1 ge '0.2.8';
192 187
193 like(http_get('/content_length'), qr/Content-Length: 3/, 188 like(http_get('/content_length'), qr/Content-Length: 3/,
194 'set Content-Length'); 189 'set Content-Length');
195 like(http_get('/content_type'), qr/Content-Type: text\/xml; charset="utf-8"\r/, 190 like(http_get('/content_type'), qr/Content-Type: text\/xml; charset="utf-8"\r/,
196 'set Content-Type'); 191 'set Content-Type');
205 like(http_get('/hdr_out?foo=12345'), qr/Foo: 12345/, 'r.headersOut'); 200 like(http_get('/hdr_out?foo=12345'), qr/Foo: 12345/, 'r.headersOut');
206 like(http_get('/hdr_out?foo=123&bar=copy'), qr/Bar: 123/, 'r.headersOut get'); 201 like(http_get('/hdr_out?foo=123&bar=copy'), qr/Bar: 123/, 'r.headersOut get');
207 unlike(http_get('/hdr_out?bar=empty'), qr/Bar:/, 'r.headersOut empty'); 202 unlike(http_get('/hdr_out?bar=empty'), qr/Bar:/, 'r.headersOut empty');
208 unlike(http_get('/hdr_out?foo='), qr/Foo:/, 'r.headersOut no value'); 203 unlike(http_get('/hdr_out?foo='), qr/Foo:/, 'r.headersOut no value');
209 unlike(http_get('/hdr_out?foo'), qr/Foo:/, 'r.headersOut no value 2'); 204 unlike(http_get('/hdr_out?foo'), qr/Foo:/, 'r.headersOut no value 2');
210 } 205
211 206 ###############################################################################
212 ###############################################################################