#!./perl
BEGIN {
chdir 't' if -d 't';
}
print "1..20\n";
print "ok 1\n";
print "ok 2\n";
$_ = "foobar";
print "ok 3\n";
# Okay, so that wasn't very challenging. Let's go Unicode.
{
my $a = "\x{41}";
print "ok 4\n";
$test++;
use bytes;
print "ok 5\n";
$test++;
}
{
print "ok 6\n";
$test++;
use bytes;
{
}
else
{
}
print "ok 7\n";
$test++;
}
{
my $a = "\x{100}";
print "ok 8\n";
$test++;
use bytes;
{
}
else
{
}
print "ok 9\n";
$test++;
}
{
my $a = "\x{100}\x{80}";
print "ok 10\n";
$test++;
use bytes;
{
}
else
{
}
print "ok 11\n";
$test++;
}
{
my $a = "\x{80}\x{100}";
print "ok 12\n";
$test++;
use bytes;
{
}
else
{
}
print "ok 13\n";
$test++;
}
# Now for Unicode with magical vtbls
{
my $a;
$a = "\x{263A}";
print "ok 14\n";
$test++;
use bytes;
print "ok 15\n";
$test++;
}
{
# Play around with Unicode strings,
# give a little workout to the UTF-8 length cache.
chop $a;
$a .= $a;
}