[Catalyst-commits] r12539 -
Catalyst-Runtime/5.80/branches/uri_for_utf8/t/aggregate
caelum at dev.catalyst.perl.org
caelum at dev.catalyst.perl.org
Thu Jan 7 00:04:46 GMT 2010
Author: caelum
Date: 2010-01-07 00:04:45 +0000 (Thu, 07 Jan 2010)
New Revision: 12539
Modified:
Catalyst-Runtime/5.80/branches/uri_for_utf8/t/aggregate/unit_core_uri_for_multibytechar.t
Log:
add a test for the uri_for utf8 stuff
Modified: Catalyst-Runtime/5.80/branches/uri_for_utf8/t/aggregate/unit_core_uri_for_multibytechar.t
===================================================================
--- Catalyst-Runtime/5.80/branches/uri_for_utf8/t/aggregate/unit_core_uri_for_multibytechar.t 2010-01-06 22:56:59 UTC (rev 12538)
+++ Catalyst-Runtime/5.80/branches/uri_for_utf8/t/aggregate/unit_core_uri_for_multibytechar.t 2010-01-07 00:04:45 UTC (rev 12539)
@@ -1,10 +1,9 @@
use strict;
use warnings;
-
use FindBin;
use lib "$FindBin::Bin/../lib";
-use Test::More tests => 5;
+use Test::More;
use_ok('TestApp');
@@ -33,3 +32,19 @@
# multibyte with utf8 string
is($context->uri_for('/', { name => "\x{6751}\x{702c}\x{5927}\x{8f14}" }), $uri_with_multibyte, 'uri_for with utf8 string query');
is($context->req->uri_with({ name => "\x{6751}\x{702c}\x{5927}\x{8f14}" }), $uri_with_multibyte, 'uri_with with utf8 string query');
+
+# multibyte captures and args
+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');
+}
+
+done_testing;
More information about the Catalyst-commits
mailing list