5 use lib "$FindBin::Bin/../lib";
7 use Test::More tests => 5;
11 my $base = 'http://127.0.0.1';
13 my $request = Catalyst::Request->new({
14 base => URI->new($base),
15 uri => URI->new("$base/"),
18 my $context = Catalyst::Context->new( request => $request, application => TestApp->new );
20 my $uri_with_multibyte = URI->new($base);
21 $uri_with_multibyte->path('/');
22 $uri_with_multibyte->query_form(
26 # multibyte with utf8 bytes
27 is($context->uri_for('/', { name => '村瀬大輔' }), $uri_with_multibyte, 'uri_for with utf8 bytes query');
28 is($context->req->uri_with({ name => '村瀬大輔' }), $uri_with_multibyte, 'uri_with with utf8 bytes query');
30 # multibyte with utf8 string
31 is($context->uri_for('/', { name => "\x{6751}\x{702c}\x{5927}\x{8f14}" }), $uri_with_multibyte, 'uri_for with utf8 string query');
32 is($context->req->uri_with({ name => "\x{6751}\x{702c}\x{5927}\x{8f14}" }), $uri_with_multibyte, 'uri_with with utf8 string query');