diff options
author | Father Chrysostomos <sprout@cpan.org> | 2013-11-01 22:00:35 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2013-11-08 17:55:50 -0800 |
commit | 17412180378fef6f7c7ee7d014f76f84c38ff202 (patch) | |
tree | 8afb9365f44d0637d91703cfc255791ac7d5821f /lib/vmsish.t | |
parent | e657afcbc45e609d67aec2a0312fc1389caa6539 (diff) | |
download | perl-17412180378fef6f7c7ee7d014f76f84c38ff202.tar.gz |
Failing tests for &CORE::exit/die with vmsish
Diffstat (limited to 'lib/vmsish.t')
-rw-r--r-- | lib/vmsish.t | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/lib/vmsish.t b/lib/vmsish.t index 7392fed914..f2b451d918 100644 --- a/lib/vmsish.t +++ b/lib/vmsish.t @@ -10,7 +10,7 @@ $perl = VMS::Filespec::vmsify($perl) if $^O eq 'VMS'; my $Invoke_Perl = qq(MCR $perl "-I[-.lib]"); -use Test::More tests => 25; +use Test::More tests => 29; SKIP: { skip("tests for non-VMS only", 1) if $^O eq 'VMS'; @@ -24,7 +24,7 @@ SKIP: { } SKIP: { - skip("tests for VMS only", 24) unless $^O eq 'VMS'; + skip("tests for VMS only", 28) unless $^O eq 'VMS'; #========== vmsish status ========== `$Invoke_Perl -e 1`; # Avoid system() from a pipe from harness. Mutter. @@ -60,6 +60,11 @@ is($?,0,"outer lex scope of vmsish [POSIX status]"); ok(length($msg)==0,"vmsish OK exit, DCL error message check"); is($?&1,1, "vmsish status check, vmsish OK exit"); + $msg = do_a_perl('-e "\&CORE::exit;use vmsish qw(exit);&CORE::exit(1)"'); + $msg =~ s/\n/\\n/g; # keep output on one line + ok(length($msg)==0,"vmsish OK exit (via &CORE::), DCL err msg check"); + is($?&1,1, "vmsish status check, vmsish OK exit (&CORE::exit)"); + $msg = do_a_perl('-e "use vmsish qw(exit); exit 44"'); $msg =~ s/\n/\\n/g; # keep output on one line like($msg, qr/ABORT/, "vmsish ERR exit, DCL error message check"); @@ -69,6 +74,12 @@ is($?,0,"outer lex scope of vmsish [POSIX status]"); $msg =~ s/\n/\\n/g; # keep output on one line ok(($msg !~ /ABORT/),"POSIX ERR exit, vmsish hushed, DCL error message check"); + $msg = do_a_perl('-e "\&CORE::exit; use vmsish qw(hushed); ' + .'vmsish::hushed(0); &CORE::exit 1"'); + $msg =~ s/\n/\\n/g; # keep output on one line + ok(($msg !~ /ABORT/), + "POSIX ERR exit, vmsish hushed, DCL error message check (&CORE::exit)"); + $msg = do_a_perl('-e "use vmsish qw(exit hushed); exit 44"'); $msg =~ s/\n/\\n/g; # keep output on one line ok(($msg !~ /ABORT/),"vmsish ERR exit, vmsish hushed, DCL error message check"); @@ -81,6 +92,11 @@ is($?,0,"outer lex scope of vmsish [POSIX status]"); $msg =~ s/\n/\\n/g; # keep output on one line ok(($msg !~ /ABORT/),"die, vmsish hushed, DCL error message check"); + $msg = do_a_perl('-e "\&CORE::die; use vmsish qw(hushed); ' + .'vmsish::hushed(0); &CORE::die(qw(blah));"'); + $msg =~ s/\n/\\n/g; # keep output on one line + ok(($msg !~ /ABORT/),"&CORE::die, vmsish hushed, DCL error msg check"); + $msg = do_a_perl('-e "use vmsish qw(hushed); use Carp; croak(qw(blah));"'); $msg =~ s/\n/\\n/g; # keep output on one line ok(($msg !~ /ABORT/),"croak, vmsish hushed, DCL error message check"); |