encoding.t revision 7c478bd95313f5f23a4c958a745db2134aa03244
#!./perl -w
BEGIN {
chdir 't' if -d 't';
# to warn here:
print "1..0 # Skip: not perlio\n";
exit 0;
}
print "1..0 # Skip: not Encode\n";
exit 0;
}
}
print "1..14\n";
# alpha beta gamma in ISO 8859-7
}
{
print "ok 1\n";
print "ok 2\n";
print "ok 3\n";
}
# alpha beta gamma in UTF-EBCDIC Unicode (0x3b1 0x3b2 0x3b3)
} else {
# alpha beta gamma in UTF-8 Unicode (0x3b1 0x3b2 0x3b3)
}
print "ok 4\n";
}
{
use Encode;
print "ok 5\n";
print "ok 6\n";
print "ok 7\n";
}
print "ok 8\n";
}
print "not ok 9 # Open should fail\n";
} else {
print "ok 9\n";
}
print "not ok 10 # warning is undef\n";
print "ok 10\n";
} else {
}
my $buf1;
# eof(RUSSKI);
my $buf2;
print "ok 11\n";
} else {
}
} else {
print "not ok 11 # open failed: $!\n";
}
# Check there is no Use of uninitialized value in concatenation (.) warning
# due to the way @latin2iso_num was used to make aliases.
print "not ok 12 # Open should fail\n";
} else {
print "ok 12\n";
}
print "not ok 13 # warning is undef\n";
print "ok 13\n";
} else {
print "not ok 13 # warning is: \n";
$warn =~ s/^/# /mg;
}
# Create a string of chars that are 3 bytes in UTF-8
# Write them to a file
print F $str;
# Read file back as UTF-8
my $dstr = <F>;
print "ok 14\n";
END {
}