This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
t/op/inc.t: Test incrementing UV with and without upgrading to NV.
[perl5.git] / t / bigmem / subst.t
1 #!perl
2 BEGIN {
3     chdir 't' if -d 't';
4     @INC = "../lib";
5     require './test.pl';
6 }
7
8 use 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
15 plan(2);
16
17 # [perl #103260] [perl #123071]
18 my $x;
19 $x .=" "x4096 for 1..2**30/4096;
20 is eval { $x =~ s/ /_/g }, 2**30, "subst on long strings" ;
21 is eval { $x =~ s/_/${\" "}/g },2**30,"subst on long strings (substcont)" ;