diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2003-08-21 18:09:10 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2003-08-21 18:09:10 +0000 |
commit | 4de5f5caa29d6a57b47c489616e3eb1627496091 (patch) | |
tree | a2cf807efaf284c5487e54c102614067dd5268aa /t/io | |
parent | 14fb0816f82645feea09be96f0558a9eca72698e (diff) | |
download | perl-4de5f5caa29d6a57b47c489616e3eb1627496091.tar.gz |
Fix the syswrite downgrade bug of
[perl #23428] Somethings rotten in unicode semantics
p4raw-id: //depot/perl@20804
Diffstat (limited to 't/io')
-rwxr-xr-x | t/io/utf8.t | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/t/io/utf8.t b/t/io/utf8.t index 6a24c51e7e..6b189ee352 100755 --- a/t/io/utf8.t +++ b/t/io/utf8.t @@ -13,7 +13,7 @@ no utf8; # needed for use utf8 not griping about the raw octets require "./test.pl"; -plan(tests => 49); +plan(tests => 51); $| = 1; @@ -301,6 +301,15 @@ ok( 1 ); # last test here 49 } +{ + # [perl #23428] Somethings rotten in unicode semantics + open F, ">a"; + binmode F, ":utf8"; + syswrite(F, $a = chr(0x100)); + is( ord($a), 0x100, '23428 syswrite should not downgrade scalar' ); + like( $a, qr/^\w+/, '23428 syswrite should not downgrade scalar' ); +} + # sysread() and syswrite() tested in lib/open.t since Fcntl is used END { |