Eliminate pragma/warn-regexec test dependence on REG_INFTY value
[p5sagit/p5-mst-13.2.git] / t / pragma / warn / regexec
1   regexec.c     
2
3   Complex regular subexpression recursion limit (%d) exceeded
4
5         $_ = 'a' x (2**15+1); /^()(a\1)*$/ ;
6   Complex regular subexpression recursion limit (%d) exceeded
7
8         $_ = 'a' x (2**15+1); /^()(a\1)*?$/ ;
9
10   (The actual value substituted for %d is masked in the tests so that
11   REG_INFTY configuration variable value does not affect outcome.)
12 __END__
13 # regexec.c
14 use warning 'unsafe' ;
15 $SIG{__WARN__} = sub{local ($m) = shift;
16                  $m =~ s/\(\d+\)/(*MASKED*)/;
17                  print STDERR $m};
18 print("SKIPPED\n# win32 can't increase stacksize in shell\n"),exit
19     if $^O eq 'MSWin32';
20 $_ = 'a' x (2**15+1); 
21 /^()(a\1)*$/ ;
22 #
23 # If this test fails with a segmentation violation or similar,
24 # you may have to increase the default stacksize limit in your
25 # shell.  You may need superuser privileges.
26 #
27 # Under the sh, ksh, zsh:
28 #    $ ulimit -s
29 #    8192
30 #    $ ulimit -s 16000
31 #
32 # Under the csh:
33 #    % limit stacksize
34 #    stacksize        8192 kbytes
35 #    % limit stacksize 16000
36 #
37 EXPECT
38 Complex regular subexpression recursion limit (*MASKED*) exceeded at - line 9.
39 ########
40 # regexec.c
41 use warning 'unsafe' ;
42 $SIG{__WARN__} = sub{local ($m) = shift;
43                  $m =~ s/\(\d+\)/(*MASKED*)/;
44                  print STDERR $m};
45 print("SKIPPED\n# win32 can't increase stacksize in shell\n"),exit
46     if $^O eq 'MSWin32';
47 $_ = 'a' x (2**15+1);
48 /^()(a\1)*?$/ ;
49 #
50 # If this test fails with a segmentation violation or similar,
51 # you may have to increase the default stacksize limit in your
52 # shell.  You may need superuser privileges.
53 #
54 # Under the sh, ksh, zsh:
55 #    $ ulimit -s
56 #    8192
57 #    $ ulimit -s 16000
58 #
59 # Under the csh:
60 #    % limit stacksize
61 #    stacksize        8192 kbytes
62 #    % limit stacksize 16000
63 #
64 EXPECT
65 Complex regular subexpression recursion limit (*MASKED*) exceeded at - line 9.