summaryrefslogtreecommitdiff
path: root/t/pragma
diff options
context:
space:
mode:
authorDominic Dunlop <domo@computer.org>1998-09-08 15:34:53 +0000
committerGurusamy Sarathy <gsar@cpan.org>1998-09-23 09:44:25 +0000
commit90ba36ed4ffc871de59510f075d187b51e1bac07 (patch)
tree0a67980ea96854f688b8eda72e8023a6928da001 /t/pragma
parenta8ac1e791509ee4f5fa77a7b6e495add327ee573 (diff)
downloadperl-90ba36ed4ffc871de59510f075d187b51e1bac07.tar.gz
Eliminate pragma/warn-regexec test dependence on REG_INFTY value
Message-Id: <v03110701b21afbdc7cfb@[212.24.192.76]> p4raw-id: //depot/perl@1841
Diffstat (limited to 't/pragma')
-rw-r--r--t/pragma/warn/regexec16
1 files changed, 12 insertions, 4 deletions
diff --git a/t/pragma/warn/regexec b/t/pragma/warn/regexec
index 158a7538ae..7c44e3efc1 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.