diff options
author | Nick Ing-Simmons <nik@tiuk.ti.com> | 2002-09-07 10:18:20 +0000 |
---|---|---|
committer | Nick Ing-Simmons <nik@tiuk.ti.com> | 2002-09-07 10:18:20 +0000 |
commit | cb5fdd89057107323f000050b37f8574253e2073 (patch) | |
tree | b5ae6cf29d95eeb0dbcdbcc934905a4b55274cbe /t | |
parent | e87ef8c0197c05592a0b7988f7f1af2f39f06465 (diff) | |
parent | 83d057904fcf43ccbeee0b8e23d13ba528a6cb6a (diff) | |
download | perl-cb5fdd89057107323f000050b37f8574253e2073.tar.gz |
Integrate mainline
p4raw-id: //depot/perlio@17851
Diffstat (limited to 't')
-rw-r--r-- | t/op/getpid.t | 8 | ||||
-rwxr-xr-x | t/op/pat.t | 11 | ||||
-rwxr-xr-x | t/op/recurse.t | 11 |
3 files changed, 22 insertions, 8 deletions
diff --git a/t/op/getpid.t b/t/op/getpid.t index dd06f006a6..f1a40636b4 100644 --- a/t/op/getpid.t +++ b/t/op/getpid.t @@ -5,11 +5,14 @@ BEGIN { chdir 't' if -d 't'; @INC = qw(../lib); + require './test.pl'; } use strict; use Config; +plan tests => 2; + BEGIN { if (!$Config{useithreads}) { print "1..0 # Skip: no ithreads\n"; @@ -30,6 +33,5 @@ my $ppid2 : shared = 0; new threads( sub { ($pid2, $ppid2) = ($$, getppid()); } ) -> join(); -print "1..2\n"; -print "not " if $pid != $pid2; print "ok 1 - pids\n"; -print "not " if $ppid != $ppid2; print "ok 2 - ppids\n"; +is($pid, $pid2, 'pids'); +is($ppid, $ppid2, 'ppids'); diff --git a/t/op/pat.t b/t/op/pat.t index 767c069d2d..8496f95a1e 100755 --- a/t/op/pat.t +++ b/t/op/pat.t @@ -6,7 +6,7 @@ $| = 1; -print "1..922\n"; +print "1..924\n"; BEGIN { chdir 't' if -d 't'; @@ -2902,3 +2902,12 @@ print "e" =~ /\P{InConsonant}/ ? "ok $test\n" : "not ok $test\n"; $test++; } $test = 923; + +$a = bless qr/foo/, 'Foo'; +print(('goodfood' =~ $a ? '' : 'not '), + "ok $test\t# reblessed qr// matches\n"); +++$test; + +print(($a eq '(?-xism:foo)' ? '' : 'not '), + "ok $test\t# reblessed qr// stringizes\n"); +++$test; diff --git a/t/op/recurse.t b/t/op/recurse.t index 374813c9e4..9d0064068b 100755 --- a/t/op/recurse.t +++ b/t/op/recurse.t @@ -8,7 +8,7 @@ BEGIN { chdir 't' if -d 't'; @INC = qw(. ../lib); require "test.pl"; - plan(tests => 26); + plan(tests => 28); } use strict; @@ -112,6 +112,9 @@ is(takeuchi($x, $y, $z), $z + 1, "takeuchi($x, $y, $z) == $z + 1"); is(sillysum(1000), 1000*1001/2, "recursive sum of 1..1000"); } - - - +# check ok for recursion depth > 65536 +is(runperl( + nolib => 1, + prog => q{$d=0; $e=1; sub c { ++$d; if ($d > 66000) { $e=0 } else { c(); c() unless $d % 32768 } --$d } c(); exit $e}, +), '', "64K deep recursion - no output expected"); +is($?, 0, "64K deep recursion - no coredump expected"); |