summaryrefslogtreecommitdiff
path: root/t/io
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2003-08-21 18:09:10 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2003-08-21 18:09:10 +0000
commit4de5f5caa29d6a57b47c489616e3eb1627496091 (patch)
treea2cf807efaf284c5487e54c102614067dd5268aa /t/io
parent14fb0816f82645feea09be96f0558a9eca72698e (diff)
downloadperl-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-xt/io/utf8.t11
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 {