diff http_headers_multi.t @ 1987:a095b971fbcc

Tests: removed TODO and try_run() checks for legacy versions. For h2_http2.t, try_run() is preserved to ensure that deprecation warnings for "listen ... http2" are suppressed, yet plan() is reported before try_run(), so failure to start will be properly reported.
author Maxim Dounin <mdounin@mdounin.ru>
date Tue, 04 Jun 2024 18:38:01 +0300
parents e44ee916b959
children
line wrap: on
line diff
--- a/http_headers_multi.t
+++ b/http_headers_multi.t
@@ -144,15 +144,9 @@ like(get('/', map { "X-Forwarded-For: $_
 	qr/X-Forwarded-For: foo, bar, bazz/, 'multi $http_x_forwarded_for');
 like(get('/', 'Cookie: foo=1', 'Cookie: bar=2', 'Cookie: bazz=3'),
 	qr/X-Cookie: foo=1; bar=2; bazz=3/, 'multi $http_cookie');
-
-TODO: {
-local $TODO = 'not yet' unless $t->has_version('1.23.0');
-
 like(get('/', 'Foo: foo', 'Foo: bar', 'Foo: bazz'),
 	qr/X-Foo: foo, bar, bazz/, 'multi $http_foo');
 
-}
-
 # request cookies, $cookie_*
 
 my $r = get('/', 'Cookie: foo=1', 'Cookie: bar=2', 'Cookie: bazz=3');
@@ -167,27 +161,16 @@ like($r, qr/X-Cookie-Bazz: 3/, '$cookie_
 
 like($r, qr/X-Sent-CC: foo, bar, bazz/, 'multi $sent_http_cache_control');
 like($r, qr/X-Sent-Link: foo, bar, bazz/, 'multi $sent_http_link');
-
-TODO: {
-local $TODO = 'not yet' unless $t->has_version('1.23.0');
-
 like($r, qr/X-Sent-Foo: foo, bar, bazz/, 'multi $sent_http_foo');
 
-}
-
 # upstream response headers, $upstream_http_*
 
 $r = get('/u');
 
-TODO: {
-local $TODO = 'not yet' unless $t->has_version('1.23.0');
-
 like($r, qr/X-Upstream-Set-Cookie: foo=1, bar=2, bazz=3/,
 	'multi $upstream_http_set_cookie');
 like($r, qr/X-Upstream-Bar: foo, bar, bazz/, 'multi $upstream_http_bar');
 
-}
-
 # upstream response cookies, $upstream_cookie_*
 
 like($r, qr/X-Upstream-Cookie-Foo: 1/, '$upstream_cookie_foo');
@@ -196,14 +179,9 @@ like($r, qr/X-Upstream-Cookie-Bazz: 3/, 
 
 # response trailers, $sent_trailer_*
 
-TODO: {
-local $TODO = 'not yet' unless $t->has_version('1.23.0');
-
 like(get('/t'), qr/X-Sent-Trailer-Foo: foo, bar, bazz/,
 	'multi $sent_trailer_foo');
 
-}
-
 # various variables for request headers:
 #
 # $http_host, $http_user_agent, $http_referer
@@ -216,19 +194,12 @@ like(get('/t'), qr/X-Sent-Trailer-Foo: f
 like(get('/v'), qr/X-HTTP-Host: localhost/, '$http_host');
 like(get('/v', 'Host: foo', 'Host: bar'),
 	qr/400 Bad/, 'duplicate host rejected');
-
-TODO: {
-local $TODO = 'not yet' unless $t->has_version('1.23.0');
-
 like(get('/v', 'User-Agent: foo', 'User-Agent: bar'),
 	qr/X-User-Agent: foo, bar/, 'multi $http_user_agent (invalid)');
 like(get('/v', 'Referer: foo', 'Referer: bar'),
 	qr/X-Referer: foo, bar/, 'multi $http_referer (invalid)');
 like(get('/v', 'Via: foo', 'Via: bar', 'Via: bazz'),
 	qr/X-Via: foo, bar, bazz/, 'multi $http_via');
-
-}
-
 like(get('/v', 'Cookie: foo', 'Cookie: bar', 'Cookie: bazz'),
 	qr/X-Cookie: foo; bar; bazz/, 'multi $http_cookie');
 like(get('/v', 'X-Forwarded-For: foo', 'X-Forwarded-For: bar',
@@ -246,15 +217,9 @@ like(get('/v', 'Content-Length: 0', 'Con
 
 like(get('/v', 'Content-Type: foo'),
 	qr/X-Content-Type: foo/, '$content_type');
-
-TODO: {
-local $TODO = 'not yet' unless $t->has_version('1.23.0');
-
 like(get('/v', 'Content-Type: foo', 'Content-Type: bar'),
 	qr/X-Content-Type: foo, bar/, 'multi $content_type (invalid)');
 
-}
-
 like(http("GET /v HTTP/1.0" . CRLF . CRLF),
 	qr/X-Host: localhost/, '$host from server_name');
 like(http("GET /v HTTP/1.0" . CRLF . "Host: foo" . CRLF . CRLF),