From: Craig A. Berry Date: Tue, 7 Aug 2001 22:27:47 +0000 (-0500) Subject: fix t/run/exit.t for VMS X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=412a0271bc0b92943e80cacf6aa67b43ca8efce0;p=p5sagit%2Fp5-mst-13.2.git fix t/run/exit.t for VMS Message-Id: <5.1.0.14.0.20010806105326.02d22298@exchi01> p4raw-id: //depot/perl@11611 --- diff --git a/t/run/exit.t b/t/run/exit.t index d9fe8b4..2b8ba89 100644 --- a/t/run/exit.t +++ b/t/run/exit.t @@ -55,5 +55,13 @@ if ($^O ne 'VMS') { is( $exit >> 8, 4, 'fatal error exit' ); } -$exit = run('END { $? = 42 }'); -is( $exit >> 8, 42, 'Changing $? in END block' ); +$exit_arg = 42; +$exit = run("END { \$? = $exit_arg }"); + +# On VMS, in the child process the actual exit status will be SS$_ABORT, +# which is what you get from any non-zero value of $? that has been +# dePOSIXified by STATUS_POSIX_SET. In the parent process, all we'll +# see are the severity bits (0-2) shifted left by 8. +$exit_arg = (44 & 7) if $^O eq 'VMS'; + +is( $exit >> 8, $exit_arg, 'Changing $? in END block' );