From 90ba36ed4ffc871de59510f075d187b51e1bac07 Mon Sep 17 00:00:00 2001 From: Dominic Dunlop Date: Tue, 8 Sep 1998 15:34:53 +0000 Subject: [PATCH] Eliminate pragma/warn-regexec test dependence on REG_INFTY value Message-Id: p4raw-id: //depot/perl@1841 --- t/pragma/warn/regexec | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/t/pragma/warn/regexec b/t/pragma/warn/regexec index 158a753..7c44e3e 100644 --- a/t/pragma/warn/regexec +++ b/t/pragma/warn/regexec @@ -1,15 +1,20 @@ regexec.c - count exceeded %d + Complex regular subexpression recursion limit (%d) exceeded $_ = 'a' x (2**15+1); /^()(a\1)*$/ ; - count exceeded %d + Complex regular subexpression recursion limit (%d) exceeded $_ = 'a' x (2**15+1); /^()(a\1)*?$/ ; + (The actual value substituted for %d is masked in the tests so that + REG_INFTY configuration variable value does not affect outcome.) __END__ # regexec.c use warning 'unsafe' ; +$SIG{__WARN__} = sub{local ($m) = shift; + $m =~ s/\(\d+\)/(*MASKED*)/; + print STDERR $m}; print("SKIPPED\n# win32 can't increase stacksize in shell\n"),exit if $^O eq 'MSWin32'; $_ = 'a' x (2**15+1); @@ -30,10 +35,13 @@ $_ = 'a' x (2**15+1); # % limit stacksize 16000 # EXPECT -Complex regular subexpression recursion limit (32766) exceeded at - line 6. +Complex regular subexpression recursion limit (*MASKED*) exceeded at - line 9. ######## # regexec.c use warning 'unsafe' ; +$SIG{__WARN__} = sub{local ($m) = shift; + $m =~ s/\(\d+\)/(*MASKED*)/; + print STDERR $m}; print("SKIPPED\n# win32 can't increase stacksize in shell\n"),exit if $^O eq 'MSWin32'; $_ = 'a' x (2**15+1); @@ -54,4 +62,4 @@ $_ = 'a' x (2**15+1); # % limit stacksize 16000 # EXPECT -Complex regular subexpression recursion limit (32766) exceeded at - line 6. +Complex regular subexpression recursion limit (*MASKED*) exceeded at - line 9. -- 2.7.4