# HG changeset patch # User Maxim Dounin # Date 1254336119 -14400 # Node ID f92852da34aa50d8afe61d176fb9498d65fec922 # Parent b8b901f86518974381fb524e7d1d5e3ef8393c99 Tests: add test for empty cached response. diff --git a/proxy-cache.t b/proxy-cache.t --- a/proxy-cache.t +++ b/proxy-cache.t @@ -9,7 +9,7 @@ use warnings; use strict; -use Test::More tests => 5; +use Test::More tests => 7; BEGIN { use FindBin; chdir($FindBin::Bin); } @@ -73,6 +73,7 @@ EOF $t->write_file('t.html', 'SEE-THIS'); $t->write_file('t2.html', 'SEE-THIS'); +$t->write_file('empty.html', ''); $t->run(); ############################################################################### @@ -86,4 +87,10 @@ unlike(http_head('/t2.html'), qr/SEE-THI like(http_get('/t2.html'), qr/SEE-THIS/, 'get after head'); unlike(http_head('/t2.html'), qr/SEE-THIS/, 'head after get'); +like(http_get('/empty.html'), qr/HTTP/, 'empty get first'); +{ +local $TODO = 'not fixed yet'; +like(http_get('/empty.html'), qr/HTTP/, 'empty get second'); +} + ###############################################################################