changeset 224:ba992cfdc606

Tests: remove TODO from tests which pass in 1.2.x.
author Maxim Dounin <mdounin@mdounin.ru>
date Sun, 03 Jun 2012 14:47:10 +0400
parents f9325406df0b
children d9c5b8b9d48e
files gzip_flush.t http_host.t http_try_files.t proxy_cache.t proxy_chunked.t proxy_noclose.t proxy_redirect.t proxy_store.t ssi.t xslt.t
diffstat 10 files changed, 8 insertions(+), 94 deletions(-) [+]
line wrap: on
line diff
--- a/gzip_flush.t
+++ b/gzip_flush.t
@@ -64,14 +64,9 @@ EOF
 
 like(http_get('/'), qr/DATA/, 'request with flush');
 
-TODO: {
-local $TODO = 'not yet';
-
-# gzip filter doesn't properly handle empty flush buffers, see
+# gzip filter wasn't able to handle empty flush buffers, see
 # http://nginx.org/pipermail/nginx/2010-November/023693.html
 
 http_gzip_like(http_gzip_request('/'), qr/DATA/, 'gzip request with flush');
 
-}
-
 ###############################################################################
--- a/http_host.t
+++ b/http_host.t
@@ -67,14 +67,9 @@ is(http_absolute_path('www.abcd-ef.g02.x
 is(http_host_header('www.abcd-ef.g02.xyz.'), 'www.abcd-ef.g02.xyz',
 	'domain w/ ending dot w/o port (host header)');
 
-TODO:{
-local $TODO = 'fix this';
-
 is(http_host_header('abcd-ef.g02.xyz.:88'), 'abcd-ef.g02.xyz',
 	'domain w/ ending dot w/port (host header)');
 
-}
-
 is(http_absolute_path('www.abcd-ef.g02.xyz.'), 'www.abcd-ef.g02.xyz',
 	'domain w/ ending dot w/o port (absolute request)');
 is(http_absolute_path('abcd-ef.g02.xyz.:2'), 'abcd-ef.g02.xyz',
@@ -97,20 +92,11 @@ is(http_absolute_path('123.49.0.78'), '1
 is(http_absolute_path('123.40.56.78:123'), '123.40.56.78',
 	'ipv4 w/port (absolute request)');
 
-TODO: {
-local $TODO = 'ipv6 literals';
-
 is(http_host_header('[abcd::ef98:0:7654:321]'), '[abcd::ef98:0:7654:321]',
 	'ipv6 literal w/o port (host header)');
-
-}
-
 is(http_host_header('[abcd::ef98:0:7654:321]:80'), '[abcd::ef98:0:7654:321]',
 	'ipv6 literal w/port (host header)');
 
-TODO: {
-local $TODO = 'ipv6 literals';
-
 is(http_absolute_path('[abcd::ef98:0:7654:321]'), '[abcd::ef98:0:7654:321]',
 	'ipv6 literal w/o port (absolute request)');
 is(http_absolute_path('[abcd::ef98:0:7654:321]:5'), '[abcd::ef98:0:7654:321]',
@@ -118,21 +104,14 @@ is(http_absolute_path('[abcd::ef98:0:765
 
 is(http_host_header('[::ffff:12.30.67.89]'), '[::ffff:12.30.67.89]',
 	'ipv4-mapped ipv6 w/o port (host header)');
-}
-
 is(http_host_header('[::123.45.67.89]:4321'), '[::123.45.67.89]',
 	'ipv4-mapped ipv6 w/port (host header)');
 
-TODO: {
-local $TODO = 'ipv6 literals';
-
 is(http_absolute_path('[::123.45.67.89]'), '[::123.45.67.89]',
 	'ipv4-mapped ipv6 w/o port (absolute request)');
 is(http_absolute_path('[::ffff:12.30.67.89]:4321'), '[::ffff:12.30.67.89]',
 	'ipv4-mapped ipv6 w/port (absolute request)');
 
-}
-
 like(http_host_header('example.com/\:552', 1), qr/400/,
 	'domain w/ path separators (host header)');
 like(http_absolute_path('\e/xample.com', 1), qr/400/,
@@ -174,9 +153,6 @@ like(http_absolute_path('[ab..cd::ef98:0
 # unreserved    = ALPHA / DIGIT / "-" / "." / "_" / "~"
 #
 
-TODO: {
-local $TODO = 'IPvFuture';
-
 is(http_host_header(
 	'[v0123456789aBcDeF.!$&\'()*+,;=-._~AbCdEfGhIjKlMnOpQrStUvWxYz'
 	. '0123456789:]'),
@@ -191,16 +167,9 @@ is(http_absolute_path(
 	. '0123456789:]',
 	'IPvFuture all symbols (absolute request)');
 
-}
-
-TODO: {
-local $TODO = 'or not TODO';
-
 is(http_host_header('123.40.56.78:9000:80'), '123.40.56.78',
 	'double port hack');
 
-}
-
 ###############################################################################
 
 sub http_host_header {
--- a/http_try_files.t
+++ b/http_try_files.t
@@ -78,13 +78,7 @@ EOF
 
 like(http_get('/found.html'), qr!SEE THIS!, 'found');
 like(http_get('/uri/notfound'), qr!X-URI: /fallback!, 'not found uri');
+like(http_get('/nouri/notfound'), qr!X-URI: /fallback!, 'not found nouri');
 like(http_get('/short/long'), qr!404 Not!, 'short uri in try_files');
 
-TODO: {
-local $TODO = 'fixed in 1.1.12';
-
-like(http_get('/nouri/notfound'), qr!X-URI: /fallback!, 'not found nouri');
-
-}
-
 ###############################################################################
--- a/proxy_cache.t
+++ b/proxy_cache.t
@@ -112,12 +112,8 @@ like(http_gzip_request('/empty.html'),
 	qr/HTTP.*14\x0d\x0a.{20}\x0d\x0a0\x0d\x0a\x0d\x0a\z/s,
 	'empty get stale');
 
-{
-local $TODO = 'patch pending';
-
 http_get('/fake/unfinished');
 like(http_get('/fake/unfinished'), qr/unfinished 2/, 'unfinished not cached');
-}
 
 ###############################################################################
 
--- a/proxy_chunked.t
+++ b/proxy_chunked.t
@@ -70,13 +70,9 @@ EOF
 
 ###############################################################################
 
-{
-local $TODO = 'not yet';
-
 like(http_get('/'), qr/\x0d\x0aSEE-THIS$/s, 'chunked');
 like(http_get('/nobuffering'), qr/\x0d\x0aSEE-THIS$/s, 'chunked nobuffering');
 like(http_get('/inmemory.html'), qr/\x0d\x0aSEE-THIS$/s, 'chunked inmemory');
-}
 
 ###############################################################################
 
--- a/proxy_noclose.t
+++ b/proxy_noclose.t
@@ -73,14 +73,15 @@ EOF
 
 ###############################################################################
 
+like(http_get('/'), qr/SEE-THIS/, 'request to bad backend');
+like(http_get('/multi'), qr/AND-THIS/, 'bad backend - multiple packets');
+like(http_get('/uselen'), qr/SEE-THIS/, 'content-length actually used');
+
 TODO: {
-local $TODO = 'not fixed yet, patches under review';
+local $TODO = 'not yet';
 local $SIG{__WARN__} = sub {};
 
-like(http_get('/'), qr/SEE-THIS/, 'request to bad backend');
-like(http_get('/multi'), qr/AND-THIS/, 'bad backend - multiple packets');
 like(http_get('/nolen'), qr/SEE-THIS/, 'bad backend - no content length');
-like(http_get('/uselen'), qr/SEE-THIS/, 'content-length actually used');
 
 }
 
--- a/proxy_redirect.t
+++ b/proxy_redirect.t
@@ -115,45 +115,25 @@ is(http_get_location('http://127.0.0.1:8
 is(http_get_location('http://127.0.0.1:8080/off/on/test.html'),
 	'http://127.0.0.1:8080/on/test.html', 'rewrite off overwrite');
 
-TODO: {
-local $TODO = 'rewrite off inheritance bug';
-
 is(http_get_location('http://127.0.0.1:8080/off/on/on/test.html'),
 	'http://127.0.0.1:8080/on/on/test.html', 'rewrite inheritance');
 
-}
-
-TODO: {
-local $TODO = 'support variables in first argument';
-
 is(http_get_location('http://127.0.0.1:8080/var_here/test.html'),
 	'http://127.0.0.1:8080/replaced/test.html', 'variable in first arg');
 is(http_get_refresh('http://127.0.0.1:8080/var_here/test.html'),
 	'7; url=/replaced/test.html', 'variable in first arg (refresh)');
 
-}
-
-TODO: {
-local $TODO = 'support for regular expressions';
-
 is(http_get_location('http://127.0.0.1:8080/ReeegEX/test.html'),
 	'http://127.0.0.1:8080/replaced/test.html', 'caseless regexp');
 is(http_get_location('http://127.0.0.1:8080/regex_w_captures/test.html'),
 	'http://127.0.0.1:8080/captures/test.html', 'regexp w/captures');
 
-}
-
-TODO: {
-local $TODO = 'regular expressions and Refresh header';
-
 is(http_get_refresh('http://127.0.0.1:8080/ReeegEX/test.html'),
 	'7; url=/replaced/test.html', 'caseless regexp (refresh)');
 is(http_get_refresh('http://127.0.0.1:8080/regex_w_captures/test.html'),
 	'7; url=http://127.0.0.1:8080/captures/test.html',
 	'regexp w/captures (refresh)');
 
-}
-
 ###############################################################################
 
 sub http_get_location {
--- a/proxy_store.t
+++ b/proxy_store.t
@@ -75,7 +75,7 @@ like(http_get('/store-index-nostore.html
 	'proxy request with x-accel-expires');
 
 TODO: {
-local $TODO = 'patch under review';
+local $TODO = 'patch rejected';
 
 ok(!-e $t->testdir() . '/store-index-nostore.html', 'result not stored');
 }
@@ -88,15 +88,10 @@ sleep(1);
 ok(scalar @{[ glob $t->testdir() . '/proxy_temp/*' ]} == 0,
 	'no temp files after aborted request');
 
-TODO: {
-local $TODO = 'not fixed yet';
-
 http_get('/ssi.html', aborted => 1, sleep => 0.1);
 sleep(1);
 
 ok(scalar @{[ glob $t->testdir() . '/proxy_temp/*' ]} == 0,
 	'no temp files after aborted ssi');
 
-}
-
 ###############################################################################
--- a/ssi.t
+++ b/ssi.t
@@ -103,13 +103,8 @@ like(http_get('/test3.html'), qr/^XtestX
 # args should be in subrequest even if original request has no args and that
 # was queried somehow (e.g. by server rewrites)
 
-TODO: {
-local $TODO = 'patch under review';
-
 like(http_get('/test-args-rewrite.html'), qr/^XX$/m, 'args only subrequest');
 
-}
-
 like(http_get('/test-args-rewrite.html?wasargs'), qr/^XX$/m,
 	'args was in main request');
 
--- a/xslt.t
+++ b/xslt.t
@@ -109,15 +109,8 @@ EOF
 
 like(http_get("/x1"), qr!200 OK.*test xslt result!ms, 'simple');
 like(http_get("/x1"), qr!200 OK.*Content-Type: text/html!ms, 'content type');
-
-TODO: {
-local $TODO = 'broken in 0.7.44 (r2589)';
-
 like(http_get("/x2"), qr!200 OK.*param1=value1.*param2=data.*param3=value3!ms,
 	'params');
-
-}
-
 like(http_get("/x3"), qr!200 OK.*data=test entity!ms, 'entities');
 like(http_get("/x4"), qr!200 OK.*data=other data!ms, 'several stylesheets');