diff proxy-cache.t @ 99:f92852da34aa

Tests: add test for empty cached response.
author Maxim Dounin <mdounin@mdounin.ru>
date Wed, 30 Sep 2009 22:41:59 +0400
parents 14cf2658592d
children 6303927c18d2
line wrap: on
line diff
--- 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');
+}
+
 ###############################################################################