summaryrefslogtreecommitdiff
path: root/dist/Data-Dumper/t/bugs.t
diff options
context:
space:
mode:
Diffstat (limited to 'dist/Data-Dumper/t/bugs.t')
-rw-r--r--dist/Data-Dumper/t/bugs.t14
1 files changed, 13 insertions, 1 deletions
diff --git a/dist/Data-Dumper/t/bugs.t b/dist/Data-Dumper/t/bugs.t
index 3c5d141298..ceca4b9f94 100644
--- a/dist/Data-Dumper/t/bugs.t
+++ b/dist/Data-Dumper/t/bugs.t
@@ -12,7 +12,7 @@ BEGIN {
}
use strict;
-use Test::More tests => 6;
+use Test::More tests => 7;
use Data::Dumper;
{
@@ -85,4 +85,16 @@ Data::Dumper->Dump([*{*STDERR{IO}}]);
ok("ok", #ok
"empty-string glob [perl #72332]");
+# writing out of bounds with malformed utf8
+SKIP: {
+ eval { require Encode };
+ skip("Encode not available", 1) if $@;
+ local $^W=1;
+ local $SIG{__WARN__} = sub {};
+ my $a="\x{fc}'" x 50;
+ Encode::_utf8_on($a);
+ Dumper $a;
+ ok("ok", "no crash dumping malformed utf8 with the utf8 flag on");
+}
+
# EOF