Skip on win32, hopefully we'll get a better answer than this, but lets stop failing
[catagits/Catalyst-Runtime.git] / t / aggregate / utf8_content_length.t
CommitLineData
5ab21903 1use strict;
2use warnings;
3use FindBin qw/$Bin/;
4use lib "$Bin/../lib";
5use File::Spec;
6use Test::More;
7
8use Catalyst::Test qw/TestAppEncoding/;
9
10if ( $ENV{CATALYST_SERVER} ) {
11 plan skip_all => 'This test does not run live';
12 exit 0;
13}
14
15my $fn = "$Bin/../catalyst_130pix.gif";
16ok -r $fn, 'Can read catalyst_130pix.gif';
17my $size = -s $fn;
18{
19 my $r = request('/binary');
20 is $r->code, 200, '/binary OK';
21 is $r->header('Content-Length'), $size, '/binary correct content length';
22}
9d5277ea 23SKIP: {
24 # Test that even if what is really binary has been upgraded into character
25 # octets in perl, then when we output it we get the correct content length.
26 # The issue was initially described in the thread 'Avoiding UTF8 in
27 # Catalyst': http://lists.scsys.co.uk/pipermail/catalyst/2009-November/023912.html.
28 # FIXME! (See ml thread re 5.80015 release)
29 skip 'Known not to work on Win32', 2 if ($^O eq 'MSWin32');
5ab21903 30 my $r = request('/binary_utf8');
31 is $r->code, 200, '/binary_utf8 OK';
32 is $r->header('Content-Length'), $size, '/binary_utf8 correct content length';
33}
34
35done_testing;
36