[Catalyst-commits] r13007 - Catalyst-Plugin-Unicode-Encoding/trunk/t
u-foka at dev.catalyst.perl.org
u-foka at dev.catalyst.perl.org
Thu Mar 4 17:11:41 GMT 2010
Author: u-foka
Date: 2010-03-04 17:11:41 +0000 (Thu, 04 Mar 2010)
New Revision: 13007
Modified:
Catalyst-Plugin-Unicode-Encoding/trunk/t/06request_decode.t
Log:
Test case for utf8 encoded arguments
Modified: Catalyst-Plugin-Unicode-Encoding/trunk/t/06request_decode.t
===================================================================
--- Catalyst-Plugin-Unicode-Encoding/trunk/t/06request_decode.t 2010-03-04 10:07:43 UTC (rev 13006)
+++ Catalyst-Plugin-Unicode-Encoding/trunk/t/06request_decode.t 2010-03-04 17:11:41 UTC (rev 13007)
@@ -2,7 +2,7 @@
use strict;
use warnings;
-use Test::More tests => 5 * 3;
+use Test::More tests => 6 * 3;
use utf8;
# setup library path
@@ -30,7 +30,9 @@
],
);
+check_argument(GET "/$escape_str");
+
sub check_parameter {
my ( undef, $c ) = ctx_request(shift);
is $c->res->output => '<h1>It works</h1>';
@@ -47,3 +49,12 @@
ok utf8::is_utf8($other_foo);
is $other_foo => $decode_str;
}
+
+sub check_argument {
+ my ( undef, $c ) = ctx_request(shift);
+ is $c->res->output => '<h1>It works</h1>';
+
+ my $foo = $c->req->args->[0];
+ ok utf8::is_utf8($foo);
+ is $foo => $decode_str;
+}
More information about the Catalyst-commits
mailing list