UTF8ize split() so that the cloned substrings get the UTF8
[p5sagit/p5-mst-13.2.git] / t / pragma / utf8.t
index 1d0bef7..95deee0 100755 (executable)
@@ -10,7 +10,7 @@ BEGIN {
     }
 }
 
-print "1..66\n";
+print "1..68\n";
 
 my $test = 1;
 
@@ -295,3 +295,18 @@ sub ok_bytes {
     ok_bytes chr(0xe2), pack("C*", 0xc3, 0xa2);
     $test++;                # 66
 }
+
+{
+    use utf8;
+    my @a = map ord, split(//, join("", map chr, (1234, 123, 2345)));
+    ok "@a", "1234 123 2345";
+    $test++;                # 67
+}
+
+{
+    use utf8;
+    my $x = chr(123);
+    my @a = map ord, split(/$x/, join("", map chr, (1234, 123, 2345)));
+    ok "@a", "1234 2345";
+    $test++;                # 68
+}