diff options
Diffstat (limited to 'ext/threads/t/exit.t')
-rw-r--r-- | ext/threads/t/exit.t | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/ext/threads/t/exit.t b/ext/threads/t/exit.t index 76b03d6bdc..9e9ab10db4 100644 --- a/ext/threads/t/exit.t +++ b/ext/threads/t/exit.t @@ -2,12 +2,7 @@ use strict; use warnings; BEGIN { - if ($ENV{'PERL_CORE'}){ - chdir 't'; - unshift @INC, '../lib'; - } - - require($ENV{PERL_CORE} ? "./test.pl" : "./t/test.pl"); + require($ENV{PERL_CORE} ? './test.pl' : './t/test.pl'); use Config; if (! $Config{'useithreads'}) { @@ -53,7 +48,7 @@ my $rc = $thr->join(); ok(! defined($rc), 'Exited: threads->exit()'); -run_perl(prog => 'use threads 1.72;' . +run_perl(prog => 'use threads 1.73;' . 'threads->exit(86);' . 'exit(99);', nolib => ($ENV{PERL_CORE}) ? 0 : 1, @@ -103,7 +98,7 @@ $rc = $thr->join(); ok(! defined($rc), 'Exited: $thr->set_thread_exit_only'); -run_perl(prog => 'use threads 1.72 qw(exit thread_only);' . +run_perl(prog => 'use threads 1.73 qw(exit thread_only);' . 'threads->create(sub { exit(99); })->join();' . 'exit(86);', nolib => ($ENV{PERL_CORE}) ? 0 : 1, @@ -113,7 +108,7 @@ run_perl(prog => 'use threads 1.72 qw(exit thread_only);' . is($?>>8, 86, "'use threads 'exit' => 'thread_only'"); } -my $out = run_perl(prog => 'use threads 1.72;' . +my $out = run_perl(prog => 'use threads 1.73;' . 'threads->create(sub {' . ' exit(99);' . '});' . @@ -129,7 +124,7 @@ my $out = run_perl(prog => 'use threads 1.72;' . like($out, '1 finished and unjoined', "exit(status) in thread"); -$out = run_perl(prog => 'use threads 1.72 qw(exit thread_only);' . +$out = run_perl(prog => 'use threads 1.73 qw(exit thread_only);' . 'threads->create(sub {' . ' threads->set_thread_exit_only(0);' . ' exit(99);' . @@ -146,7 +141,7 @@ $out = run_perl(prog => 'use threads 1.72 qw(exit thread_only);' . like($out, '1 finished and unjoined', "set_thread_exit_only(0)"); -run_perl(prog => 'use threads 1.72;' . +run_perl(prog => 'use threads 1.73;' . 'threads->create(sub {' . ' $SIG{__WARN__} = sub { exit(99); };' . ' die();' . |