summaryrefslogtreecommitdiff
path: root/t/uni
diff options
context:
space:
mode:
authorBrian Fraser <fraserbn@gmail.com>2011-09-29 14:39:35 -0700
committerFather Chrysostomos <sprout@cpan.org>2011-10-06 13:01:13 -0700
commitbf29d05f84d1479fc85ca7522e262bebcb354e97 (patch)
tree6f0a9156585a1f4cd94d3822a293a1940ddaabff /t/uni
parentb375e37b5f034d8442f5744864dedf6bca9b8bea (diff)
downloadperl-bf29d05f84d1479fc85ca7522e262bebcb354e97.tar.gz
pp_sys.c: Make warnings utf8-clean
Diffstat (limited to 't/uni')
-rw-r--r--t/uni/write.t31
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 );