X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=t%2Futf_incoming.t;h=638cef5a1555ea2ab1830d0226494c86794e3187;hp=373a4286c89358c0ecca0e5158b63cd121681526;hb=70005e986f12f433f81595e35c902358487b7869;hpb=688e2420d1731666afab58c3e8dcfc1cffd6c2d1 diff --git a/t/utf_incoming.t b/t/utf_incoming.t index 373a428..638cef5 100644 --- a/t/utf_incoming.t +++ b/t/utf_incoming.t @@ -167,10 +167,19 @@ use JSON::MaybeXS; sub override_encoding :Local { my ($self, $c) = @_; $c->res->content_type('text/plain'); + $c->encoding(Encode::find_encoding('UTF-8')); $c->encoding(Encode::find_encoding('Shift_JIS')); $c->response->body("テスト"); } + sub stream_write_error :Local { + my ($self, $c) = @_; + $c->response->content_type('text/html'); + $c->response->write("

This is stream_write action ♥

"); + $c->encoding(Encode::find_encoding('Shift_JIS')); + $c->response->write("

This is stream_write action ♥

"); + } + package MyApp; use Catalyst; @@ -395,6 +404,14 @@ SKIP: { is $res->content_charset, 'UTF-8'; } +{ + my $res = request "/root/stream_write_error"; + + is $res->code, 200, 'OK'; + like decode_utf8($res->content), qr[

This is stream_write action ♥