diff options
author | Craig A. Berry <craigberry@mac.com> | 2007-07-14 02:21:14 +0000 |
---|---|---|
committer | Craig A. Berry <craigberry@mac.com> | 2007-07-14 02:21:14 +0000 |
commit | 4629c4f60ec83d0f102cd8ac641c8eefa2bb4a6f (patch) | |
tree | 2a74ef65ad6a9bf814a60235cea99b0d40056ef8 | |
parent | 1843fd2842255f58e25696dd6af96d55308b222c (diff) | |
download | perl-4629c4f60ec83d0f102cd8ac641c8eefa2bb4a6f.tar.gz |
VMS todo for threads exit test.
p4raw-id: //depot/perl@31614
-rw-r--r-- | ext/threads/t/exit.t | 29 |
1 files changed, 21 insertions, 8 deletions
diff --git a/ext/threads/t/exit.t b/ext/threads/t/exit.t index a76572d2cc..69b61261bc 100644 --- a/ext/threads/t/exit.t +++ b/ext/threads/t/exit.t @@ -14,6 +14,7 @@ BEGIN { require($ENV{PERL_CORE} ? "./test.pl" : "./t/test.pl"); } +our $TODO; use ExtUtils::testlib; @@ -61,8 +62,10 @@ run_perl(prog => 'use threads 1.63;' . 'exit(99);', nolib => ($ENV{PERL_CORE}) ? 0 : 1, switches => ($ENV{PERL_CORE}) ? [] : [ '-Mblib' ]); -is($?>>8, 86, 'thread->exit(status) in main'); - +{ + local $TODO = 'VMS exit semantics not like POSIX exit semantics' if $^O eq 'VMS'; + is($?>>8, 86, 'thread->exit(status) in main'); +} $thr = threads->create({'exit' => 'thread_only'}, sub { exit(1); @@ -109,8 +112,10 @@ run_perl(prog => 'use threads 1.63 qw(exit thread_only);' . 'exit(86);', nolib => ($ENV{PERL_CORE}) ? 0 : 1, switches => ($ENV{PERL_CORE}) ? [] : [ '-Mblib' ]); -is($?>>8, 86, "'use threads 'exit' => 'thread_only'"); - +{ + local $TODO = 'VMS exit semantics not like POSIX exit semantics' if $^O eq 'VMS'; + is($?>>8, 86, "'use threads 'exit' => 'thread_only'"); +} my $out = run_perl(prog => 'use threads 1.63;' . 'threads->create(sub {' . @@ -121,7 +126,10 @@ my $out = run_perl(prog => 'use threads 1.63;' . nolib => ($ENV{PERL_CORE}) ? 0 : 1, switches => ($ENV{PERL_CORE}) ? [] : [ '-Mblib' ], stderr => 1); -is($?>>8, 99, "exit(status) in thread"); +{ + local $TODO = 'VMS exit semantics not like POSIX exit semantics' if $^O eq 'VMS'; + is($?>>8, 99, "exit(status) in thread"); +} like($out, '1 finished and unjoined', "exit(status) in thread"); @@ -135,7 +143,10 @@ $out = run_perl(prog => 'use threads 1.63 qw(exit thread_only);' . nolib => ($ENV{PERL_CORE}) ? 0 : 1, switches => ($ENV{PERL_CORE}) ? [] : [ '-Mblib' ], stderr => 1); -is($?>>8, 99, "set_thread_exit_only(0)"); +{ + local $TODO = 'VMS exit semantics not like POSIX exit semantics' if $^O eq 'VMS'; + is($?>>8, 99, "set_thread_exit_only(0)"); +} like($out, '1 finished and unjoined', "set_thread_exit_only(0)"); @@ -147,8 +158,10 @@ run_perl(prog => 'use threads 1.63;' . 'exit(86);', nolib => ($ENV{PERL_CORE}) ? 0 : 1, switches => ($ENV{PERL_CORE}) ? [] : [ '-Mblib' ]); -is($?>>8, 99, "exit(status) in thread warn handler"); - +{ + local $TODO = 'VMS exit semantics not like POSIX exit semantics' if $^O eq 'VMS'; + is($?>>8, 99, "exit(status) in thread warn handler"); +} $thr = threads->create(sub { $SIG{__WARN__} = sub { threads->exit(); }; |