diff options
author | Michael G. Schwern <schwern@pobox.com> | 2005-05-20 22:09:00 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2005-05-27 10:52:16 +0000 |
commit | 903b8d396f689ab8e289e07813b6e751e8cad6fc (patch) | |
tree | 72d7e5610303ab58602ac561c9454ab6cc61c326 | |
parent | 8298e34656173a1c8f9f893f9ac695f67a3d6449 (diff) | |
download | perl-903b8d396f689ab8e289e07813b6e751e8cad6fc.tar.gz |
Integrate:
[ 24541]
Subject: Re: [PATCH 5.8.7 RC1] lib/Carp.t todo for VMS
Message-ID: <20050520200900.GB13473@windhund.schwern.org>
p4raw-link: @24541 on //depot/perl: 4b09a709cacc8926b531523da1d1511f3a87dcb2
p4raw-id: //depot/maint-5.8/perl@24598
p4raw-integrated: from //depot/perl@24597 'copy in' lib/Carp.t
(@24374..)
-rw-r--r-- | lib/Carp.t | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/lib/Carp.t b/lib/Carp.t index d07e202d15..2ce5eb4dff 100644 --- a/lib/Carp.t +++ b/lib/Carp.t @@ -4,6 +4,8 @@ BEGIN { require './test.pl'; } +my $Is_VMS = $^O eq 'VMS'; + use Carp qw(carp cluck croak confess); plan tests => 21; @@ -156,8 +158,18 @@ sub w { cluck @_ } } } -# Check that croak() and confess() don't clobber $! -runperl(prog => 'use Carp; $@=q{Phooey}; $!=42; croak(q{Dead})', stderr => 1); -is($?>>8, 42, 'croak() doesn\'t clobber $!'); -runperl(prog => 'use Carp; $@=q{Phooey}; $!=42; confess(q{Dead})', stderr => 1); -is($?>>8, 42, 'confess() doesn\'t clobber $!'); + +{ + local $TODO = "VMS exit status semantics don't work this way" if $Is_VMS; + + # Check that croak() and confess() don't clobber $! + runperl(prog => 'use Carp; $@=q{Phooey}; $!=42; croak(q{Dead})', + stderr => 1); + + is($?>>8, 42, 'croak() doesn\'t clobber $!'); + + runperl(prog => 'use Carp; $@=q{Phooey}; $!=42; confess(q{Dead})', + stderr => 1); + + is($?>>8, 42, 'confess() doesn\'t clobber $!'); +} |