diff options
author | Brian Fraser <fraserbn@gmail.com> | 2011-09-29 14:39:35 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2011-10-06 13:01:13 -0700 |
commit | bf29d05f84d1479fc85ca7522e262bebcb354e97 (patch) | |
tree | 6f0a9156585a1f4cd94d3822a293a1940ddaabff /t/uni | |
parent | b375e37b5f034d8442f5744864dedf6bca9b8bea (diff) | |
download | perl-bf29d05f84d1479fc85ca7522e262bebcb354e97.tar.gz |
pp_sys.c: Make warnings utf8-clean
Diffstat (limited to 't/uni')
-rw-r--r-- | t/uni/write.t | 31 |
1 files changed, 29 insertions, 2 deletions
diff --git a/t/uni/write.t b/t/uni/write.t index c60065d37b..bfc1ddbbcf 100644 --- a/t/uni/write.t +++ b/t/uni/write.t @@ -7,7 +7,7 @@ BEGIN { skip_all_without_perlio(); } -plan tests => 6; +plan tests => 8; # Some tests for UTF8 and format/write @@ -93,4 +93,31 @@ $ulite1 $bmulti$blite2 EOEXPECT -unlink_all 'Uni_write.tmp'; +{ + use utf8; + use open qw( :utf8 :std ); + + local $~ = "놋웇ʱFᚖṀŦ"; + eval { write }; + like $@, qr/Undefined format "놋웇ʱFᚖṀŦ/u, 'no such format, with format name in UTF-8.'; +} + +{ + +format OUT = + + +. + use utf8; + use open qw( :utf8 :std ); + open OUT, '>', 'Uni_write2.tmp'; + + my $oldfh = select OUT; + local $^ = "უデfiᕣネḓ_FᚖṀŦɐȾ";#"UNDEFINED_FORMAT"; + eval { write }; + like $@, qr/Undefined top format "უデfiᕣネḓ_FᚖṀŦɐȾ/u, 'no such top format'; + select $oldfh; + close OUT; +} + +unlink_all qw( Uni_write.tmp Uni_write2.tmp ); |