X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=t%2Faggregate%2Funit_core_uri_for_multibytechar.t;h=f6d4f7cbd8ed7fb9fce0e57ac3ad857c34dbcf40;hp=6f5d8ae142c93286cdbd08329000ac2edb4c69be;hb=10542b5178b2fa036e0658111523ea68a7a04437;hpb=6a887d5539852406a5db55670e0a02d4c96dabba diff --git a/t/aggregate/unit_core_uri_for_multibytechar.t b/t/aggregate/unit_core_uri_for_multibytechar.t index 6f5d8ae..f6d4f7c 100644 --- a/t/aggregate/unit_core_uri_for_multibytechar.t +++ b/t/aggregate/unit_core_uri_for_multibytechar.t @@ -1,3 +1,4 @@ +use utf8; use strict; use warnings; use FindBin; @@ -10,6 +11,7 @@ use_ok('TestApp'); my $base = 'http://127.0.0.1'; my $request = Catalyst::Request->new({ + _log => Catalyst::Log->new, base => URI->new($base), uri => URI->new("$base/"), }); @@ -37,14 +39,17 @@ is($context->req->uri_with({ name => "\x{6751}\x{702c}\x{5927}\x{8f14}" }), $uri my $action = $context->controller('Action::Chained') ->action_for('roundtrip_urifor_end'); -{ -use utf8; - is($context->uri_for($action, ['hütte'], 'hütte', { test => 'hütte' }), 'http://127.0.0.1/chained/roundtrip_urifor/h%C3%BCtte/h%C3%BCtte?test=h%C3%BCtte', 'uri_for with utf8 captures and args'); -} + +is( + $context->uri_for($action, ['♥'], '♥', { '♥' => '♥'}), + 'http://127.0.0.1/chained/roundtrip_urifor/' . '%E2%99%A5' . '/' . '%E2%99%A5' . '?' . '%E2%99%A5' . '=' . '%E2%99%A5', + 'uri_for with utf8 captures and args'); + +# ^ the match string is purposefully broken up to aid viewing, please to 'fix' it. done_testing;