6 require Config; import Config;
7 unless ($Config{'useperlio'}) {
8 print "1..0 # Skip: not perlio\n";
16 open(F,"+>:utf8",'a');
17 print F chr(0x100).'£';
18 print '#'.tell(F)."\n";
19 print "not " unless tell(F) == 4;
22 print '#'.tell(F)."\n";
23 print "not " unless tell(F) >= 5;
26 print "not " unless getc(F) eq chr(0x100);
28 print "not " unless getc(F) eq "£";
30 print "not " unless getc(F) eq "\n";
34 print "not " unless getc(F) eq chr(0xc4);
36 print "not " unless getc(F) eq chr(0x80);
38 print "not " unless getc(F) eq chr(0xc2);
40 print "not " unless getc(F) eq chr(0xa3);
42 print "not " unless getc(F) eq "\n";
46 print "not " unless scalar(<F>) eq "\x{100}£\n";
50 $count = read(F,$buf,2,1);
51 print "not " unless $count == 2;
53 print "not " unless $buf eq "\x{200}\x{100}£";