xref: /openbsd/gnu/usr.bin/perl/t/op/tr_latin1.t (revision 771fbea0)
1# Tests for tr, but the test file is not utf8.
2
3BEGIN {
4    chdir 't' if -d 't';
5    require './test.pl';
6    skip_all('ASCII sensitive') if $::IS_EBCDIC;
7    set_up_inc('../lib');
8}
9
10plan tests => 2;
11
12{ # This test is malloc senstive.  Right now on some platforms anyway, space
13  # for the final \xff needs to be mallocd, and that's what caused the
14  # problem, because the '-' had already been parsed and was later added
15  # without making space for it
16    fresh_perl_is('print "\x8c" =~ y o\x{100}����-�oo', "1", { },
17                    'RT #134067 heap-buffer-overflow in S_scan_const');
18
19}
20
21{   # gh#17277.  This caused errors with valgrind and asan
22    fresh_perl_is('no warnings qw(void uninitialized); s~~00~-y~�0~\x{E00}~',
23                  "", {}, 'gh#17227');
24}
25
261;
27