This adds a non-UTF-8 encoded file to make it easier to test malformed
UTF-8 strings. The file is automatically skipped on EBCDIC platforms.
The file is initialized with a test for [perl #129037], which had
already been unknowingly fixed by commit
75219bacf5aacd315b96083de24e82cd8238e99a
t/lib/croak/pp_hot Test croak calls from pp_hot.c
t/lib/croak/pp_sys Test croak calls from pp_sys.c
t/lib/croak/toke Test croak calls from toke.c
+t/lib/croak/toke_l1 Test croak calls from toke.c; file is not UTF-8 encoded
t/lib/cygwin.t Builtin cygwin function tests
t/lib/dbmt_common.pl Common functionality for ?DBM_File tests
t/lib/deprecate.t Test deprecate.pm
glob catfile(curdir(), "lib", $pragma_name, "*");
}
+if ($::IS_EBCDIC) { # Skip Latin1 files
+ @w_files = grep { $_ !~ / _l1 $/x } @w_files
+}
+
my ($tests, @prgs) = setup_multiple_progs(@w_files);
$^X = rel2abs($^X);
--- /dev/null
+# File is encoded in latin-1 so can have malformed-utf8
+__END__
+# NAME [perl #129037]
+BEGIN{{};$^H=-1}0Ã
+EXPECT
+Malformed UTF-8 character: \xc3\x0a (unexpected non-continuation byte 0x0a, immediately after start byte 0xc3; need 2 bytes, got 1) at - line 1.
+Constant(0): $^H{integer} is not defined at - line 1, at end of line
+Malformed UTF-8 character (fatal) at - line 1.
+########