This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
amigaos4: no env in main()
[perl5.git] / t / bigmem / subst.t
CommitLineData
3c6ef0a5
FC
1#!perl
2BEGIN {
3 chdir 't' if -d 't';
4 @INC = "../lib";
5 require './test.pl';
6}
7
8use Config qw(%Config);
9
10$ENV{PERL_TEST_MEMORY} >= 4
11 or skip_all("Need ~4Gb for this test");
12$Config{ptrsize} >= 8
13 or skip_all("Need 64-bit pointers for this test");
14
15plan(2);
16
17# [perl #103260] [perl #123071]
3c6ef0a5
FC
18my $x;
19$x .=" "x4096 for 1..2**30/4096;
20is eval { $x =~ s/ /_/g }, 2**30, "subst on long strings" ;
21is eval { $x =~ s/_/${\" "}/g },2**30,"subst on long strings (substcont)" ;