1#!./perl 2 3BEGIN { 4 chdir 't' if -d 't'; 5 @INC = '../lib'; 6 unless (find PerlIO::Layer 'perlio') { 7 print "1..0 # Skip: not perlio\n"; 8 exit 0; 9 } 10} 11 12require "./test.pl"; 13 14plan(tests => 5); 15 16my $io; 17 18use_ok('IO::File'); 19 20$io = IO::File->new; 21 22ok($io->open("io_utf8", ">:utf8"), "open >:utf8"); 23ok((print $io chr(256)), "print chr(256)"); 24undef $io; 25 26$io = IO::File->new; 27ok($io->open("io_utf8", "<:utf8"), "open <:utf8"); 28is(ord(<$io>), 256, "readline chr(256)"); 29undef $io; 30 31END { 32 1 while unlink "io_utf8"; 33} 34