[Catalyst-commits] r7440 - Catalyst-Runtime/5.70/trunk/t
jrockway at dev.catalyst.perl.org
jrockway at dev.catalyst.perl.org
Tue Feb 12 07:55:15 GMT 2008
Author: jrockway
Date: 2008-02-12 07:55:11 +0000 (Tue, 12 Feb 2008)
New Revision: 7440
Modified:
Catalyst-Runtime/5.70/trunk/t/unit_core_uri_for_multibytechar.t
Log:
fix up the unit_core_uri_for_multibytechar test; "use utf8" so that we actually test the submitted code (instead of nothing)
Modified: Catalyst-Runtime/5.70/trunk/t/unit_core_uri_for_multibytechar.t
===================================================================
--- Catalyst-Runtime/5.70/trunk/t/unit_core_uri_for_multibytechar.t 2008-02-11 16:32:21 UTC (rev 7439)
+++ Catalyst-Runtime/5.70/trunk/t/unit_core_uri_for_multibytechar.t 2008-02-12 07:55:11 UTC (rev 7440)
@@ -5,9 +5,10 @@
use File::Spec;
use lib File::Spec->catfile($FindBin::Bin, 'lib');
-use Test::More;
+use utf8; # for literal below
+use Encode; # URI.pm is braindead wrt unicode-flagged characters
-plan tests => 5;
+use Test::More tests => 5;
use_ok('TestApp');
@@ -26,10 +27,9 @@
my $uri_with_multibyte = URI->new($base);
$uri_with_multibyte->path('/');
$uri_with_multibyte->query_form(
- name => '村瀬大輔',
+ name => Encode::encode('utf8', '村瀬大輔'),
);
-
# multibyte with utf8 bytes
is($context->uri_for('/', { name => '村瀬大輔' }), $uri_with_multibyte, 'uri_for with utf8 bytes query');
is($context->req->uri_with({ name => '村瀬大輔' }), $uri_with_multibyte, 'uri_with with utf8 bytes query');
More information about the Catalyst-commits
mailing list