diff options
author | Nick Ing-Simmons <nik@tiuk.ti.com> | 2000-12-09 23:40:14 +0000 |
---|---|---|
committer | Nick Ing-Simmons <nik@tiuk.ti.com> | 2000-12-09 23:40:14 +0000 |
commit | eb5c063ad00efba84ec136b0b86cfe12eb4ab14c (patch) | |
tree | 01f417ed25c433c073ceac7e2054f3c28f69e4cf /t/io | |
parent | d75029d0f4549b2fe0cff3cd80934a1b6bbb54eb (diff) | |
download | perl-eb5c063ad00efba84ec136b0b86cfe12eb4ab14c.tar.gz |
read/sysread/recv should now be utf8 aware.
Basic test for utf8 read.
p4raw-id: //depot/perlio@8059
Diffstat (limited to 't/io')
-rwxr-xr-x | t/io/utf8.t | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/t/io/utf8.t b/t/io/utf8.t index 1e47c33d3f..f4be69d3a0 100755 --- a/t/io/utf8.t +++ b/t/io/utf8.t @@ -11,7 +11,7 @@ BEGIN { } $| = 1; -print "1..11\n"; +print "1..13\n"; open(F,"+>:utf8",'a'); print F chr(0x100).'£'; @@ -45,6 +45,13 @@ seek(F,0,0); binmode(F,":utf8"); print "not " unless scalar(<F>) eq "\x{100}£\n"; print "ok 11\n"; +seek(F,0,0); +$buf = chr(0x200); +$count = read(F,$buf,2,1); +print "not " unless $count == 2; +print "ok 12\n"; +print "not " unless $buf eq "\x{200}\x{100}£"; +print "ok 13\n"; close(F); # unlink('a'); |