This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
re-fix leak in Devel-PPPort
[perl5.git] / t / uni / tie.t
index 28ea0dc..c476306 100644 (file)
@@ -1,10 +1,11 @@
 #!perl -w
 
 BEGIN {
+    chdir 't' if -d 't';
     require './test.pl';
 }
 
-plan (tests => 9);
+plan (tests => 10);
 use strict;
 
 {
@@ -41,6 +42,19 @@ foreach my $t ("ASCII", "B\366se") {
 }
 
 {
+    use utf8;
+    use open qw( :utf8 :std );
+    package Tìè::UTF8 {
+        sub TIESCALAR {
+            return bless {}, shift;
+        }
+    }
+    
+    my $t;
+    tie $t, 'Tìè::UTF8';
+    is ref(tied($t)), 'Tìè::UTF8', "Tie'ing to a UTF8 package works.";
+}
+{
     local $::TODO = "Need more tests!";
     fail();
 }