X-Git-Url: https://perl5.git.perl.org/perl5.git/blobdiff_plain/45dea987ac01a22d305c6aa3413f540409537f26..5636d5186838c19e5d814e8b62c9342c926b3bb0:/t/op/length.t diff --git a/t/op/length.t b/t/op/length.t index c4445e3..3170beb 100644 --- a/t/op/length.t +++ b/t/op/length.t @@ -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++; +}