File: tr_latin1.t

package info (click to toggle)
perl 5.36.0-7%2Bdeb12u3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 120,064 kB
  • sloc: ansic: 650,199; perl: 478,052; sh: 70,710; pascal: 8,435; xml: 2,428; yacc: 1,230; makefile: 1,175; cpp: 208; lisp: 1
file content (26 lines) | stat: -rw-r--r-- 782 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# Tests for tr, but the test file is not utf8.

BEGIN {
    chdir 't' if -d 't';
    require './test.pl';
    skip_all('ASCII sensitive') if $::IS_EBCDIC;
    set_up_inc('../lib');
}

plan tests => 2;

{ # This test is malloc sensitive.  Right now on some platforms anyway, space
  # for the final \xff needs to be mallocd, and that's what caused the
  # problem, because the '-' had already been parsed and was later added
  # without making space for it
    fresh_perl_is('print "\x8c" =~ y o\x{100}Č-oo', "1", { },
                    'RT #134067 heap-buffer-overflow in S_scan_const');

}

{   # gh#17277.  This caused errors with valgrind and asan
    fresh_perl_is('no warnings qw(void uninitialized); s~~00~-y~0~\x{E00}~',
                  "", {}, 'gh#17227');
}

1;