X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=trunk%2Ft%2Faggregate%2Futf8_content_length.t;fp=trunk%2Ft%2Faggregate%2Futf8_content_length.t;h=86297e8496c36fb6d1b4a425f9cda4d5fc7a8d9a;hb=e28a6876ad3e11890226e5bab6df4b0725e0981e;hp=0000000000000000000000000000000000000000;hpb=21c94d83082b43028cafcfb18659090b13d832fa;p=catagits%2FCatalyst-Runtime.git diff --git a/trunk/t/aggregate/utf8_content_length.t b/trunk/t/aggregate/utf8_content_length.t new file mode 100644 index 0000000..86297e8 --- /dev/null +++ b/trunk/t/aggregate/utf8_content_length.t @@ -0,0 +1,30 @@ +use strict; +use warnings; +use FindBin qw/$Bin/; +use lib "$Bin/../lib"; +use File::Spec; +use Test::More; + +use Catalyst::Test qw/TestAppEncoding/; + +if ( $ENV{CATALYST_SERVER} ) { + plan skip_all => 'This test does not run live'; + exit 0; +} + +my $fn = "$Bin/../catalyst_130pix.gif"; +ok -r $fn, 'Can read catalyst_130pix.gif'; +my $size = -s $fn; +{ + my $r = request('/binary'); + is $r->code, 200, '/binary OK'; + is $r->header('Content-Length'), $size, '/binary correct content length'; +} +{ + my $r = request('/binary_utf8'); + is $r->code, 200, '/binary_utf8 OK'; + is $r->header('Content-Length'), $size, '/binary_utf8 correct content length'; +} + +done_testing; +