make uri_for unicode safe
[catagits/Catalyst-Runtime.git] / t / live_engine_request_uri.t
index 3bfaec4..dba622f 100644 (file)
@@ -1,4 +1,4 @@
-#!perl\r
+\feff#!perl\r
 \r
 use strict;\r
 use warnings;\r
@@ -6,7 +6,7 @@ use warnings;
 use FindBin;\r
 use lib "$FindBin::Bin/lib";\r
 \r
-use Test::More tests => 35;\r
+use Test::More tests => 38;\r
 use Catalyst::Test 'TestApp';\r
 use Catalyst::Request;\r
 \r
@@ -83,3 +83,10 @@ my $creq;
     is( $response->header( 'X-Catalyst-Param-a' ), '1', 'param "a" ok' );\r
     is( $response->header( 'X-Catalyst-Param-b' ), '1', 'param "b" ok' );\r
 }\r
+\r
+# test that uri_with is utf8 safe\r
+{\r
+    ok( my $response = request("http://localhost/engine/request/uri/uri_with_utf8"), 'Request' );\r
+    ok( $response->is_success, 'Response Successful 2xx' );\r
+    like( $response->header( 'X-Catalyst-uri-with' ), qr/%E2%98%A0$/, 'uri_with ok' );\r
+}\r