diff options
author | Michael G. Schwern <schwern@pobox.com> | 2005-05-20 22:09:00 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2005-05-22 18:53:12 +0000 |
commit | 4b09a709cacc8926b531523da1d1511f3a87dcb2 (patch) | |
tree | fc91e4d98483b4ada151470f6541a93127ed8ba5 /lib/Carp.t | |
parent | 2a9d46aca4fcc38a37d117c400a7d318e3e521b7 (diff) | |
download | perl-4b09a709cacc8926b531523da1d1511f3a87dcb2.tar.gz |
Re: [PATCH 5.8.7 RC1] lib/Carp.t todo for VMS
Message-ID: <20050520200900.GB13473@windhund.schwern.org>
p4raw-id: //depot/perl@24541
Diffstat (limited to 'lib/Carp.t')
-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 $!'); +} |