whitespace cleanup
[catagits/Catalyst-Runtime.git] / t / lib / TestAppEncoding / Controller / Root.pm
index 391a2cd..72296ad 100644 (file)
@@ -8,7 +8,12 @@ __PACKAGE__->config->{namespace} = '';
 
 sub binary : Local {
     my ($self, $c) = @_;
-    $c->res->body(do { open(my $fh, '<', $c->path_to('..', '..', 'catalyst_130pix.gif')) or die $!; binmode($fh); local $/ = undef; <$fh>; });
+    $c->res->content_type('image/gif');
+    $c->res->body(do {
+        open(my $fh, '<', $c->path_to('..', '..', 'catalyst_130pix.gif')) or die $!;
+        binmode($fh);
+        local $/ = undef; <$fh>;
+    });
 }
 
 sub binary_utf8 : Local {
@@ -20,6 +25,19 @@ sub binary_utf8 : Local {
     $c->res->body($str);
 }
 
+# called by t/aggregate/catalyst_test_utf8.t
+sub utf8_non_ascii_content : Local {
+    use utf8;
+    my ($self, $c) = @_;
+
+    my $str = 'ʇsʎlɐʇɐɔ';  # 'catalyst' flipped at http://www.revfad.com/flip.html
+    ok utf8::is_utf8($str), '$str is in UTF8 internally';
+
+    $c->res->content_type('text/plain');
+    $c->res->body($str);
+}
+
+
 sub end : Private {
     my ($self,$c) = @_;
 }