summaryrefslogtreecommitdiff
path: root/t/pragma/warn/doop
diff options
context:
space:
mode:
Diffstat (limited to 't/pragma/warn/doop')
-rw-r--r--t/pragma/warn/doop25
1 files changed, 25 insertions, 0 deletions
diff --git a/t/pragma/warn/doop b/t/pragma/warn/doop
new file mode 100644
index 0000000000..458a3b2803
--- /dev/null
+++ b/t/pragma/warn/doop
@@ -0,0 +1,25 @@
+ doop.c AOK
+
+ Malformed UTF-8 character
+
+
+__END__
+# doop.c
+use utf8 ;
+$_ = "\x80 \xff" ;
+chop ;
+EXPECT
+Malformed UTF-8 character at - line 4.
+########
+# doop.c
+use warning 'utf8' ;
+use utf8 ;
+$_ = "\x80 \xff" ;
+chop ;
+no warning 'utf8' ;
+$_ = "\x80 \xff" ;
+chop ;
+EXPECT
+\x80 will produce malformed UTF-8 character; use \x{80} for that at - line 4.
+\xff will produce malformed UTF-8 character; use \x{ff} for that at - line 4.
+Malformed UTF-8 character at - line 5.