Non-VMS-fixed and Win32-skipped version of
[p5sagit/p5-mst-13.2.git] / t / op / length.t
index c4445e3..0660d68 100644 (file)
@@ -5,7 +5,7 @@ BEGIN {
     @INC = '../lib';
 }
 
-print "1..13\n";
+print "1..15\n";
 
 print "not " unless length("")    == 0;
 print "ok 1\n";
@@ -115,3 +115,21 @@ print "ok 3\n";
     print "ok 13\n";
     $test++;
 }
+
+# Now for Unicode with magical vtbls
+
+{
+    require Tie::Scalar;
+    my $a;
+    tie $a, 'Tie::StdScalar';  # makes $a magical
+    $a = "\x{263A}";
+    
+    print "not " unless length($a) == 1;
+    print "ok 14\n";
+    $test++;
+
+    use bytes;
+    print "not " unless length($a) == 3;
+    print "ok 15\n";
+    $test++;
+}