Silence some warnings introduced by #33507
[p5sagit/p5-mst-13.2.git] / ext / IO / t / io_utf8.t
CommitLineData
73829507 1#!./perl
2
3BEGIN {
35a60386 4 unless(grep /blib/, @INC) {
5 chdir 't' if -d 't';
6 @INC = '../lib';
7 }
8 unless ($] >= 5.008 and find PerlIO::Layer 'perlio') {
73829507 9 print "1..0 # Skip: not perlio\n";
10 exit 0;
11 }
12}
13
35a60386 14require($ENV{PERL_CORE} ? "./test.pl" : "./t/test.pl");
73829507 15
16plan(tests => 5);
17
18my $io;
19
20use_ok('IO::File');
21
22$io = IO::File->new;
23
24ok($io->open("io_utf8", ">:utf8"), "open >:utf8");
25ok((print $io chr(256)), "print chr(256)");
26undef $io;
27
28$io = IO::File->new;
29ok($io->open("io_utf8", "<:utf8"), "open <:utf8");
30is(ord(<$io>), 256, "readline chr(256)");
31undef $io;
32
33END {
34 1 while unlink "io_utf8";
35}