This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Perl_hv_placeholders_get() actually takes a const HV *hv.
[perl5.git] / lib / base / t / sigdie.t
1 #!/usr/bin/perl -w
2
3 BEGIN {
4    if( $ENV{PERL_CORE} ) {
5         chdir 't' if -d 't';
6         @INC = qw(../lib ../t/lib);
7     }
8 }
9
10 use strict;
11 use Test::More tests => 2;
12
13 use base;
14
15 {
16     package Test::SIGDIE;
17
18     local $SIG{__DIE__} = sub { 
19         ::fail('sigdie not caught, this test should not run') 
20     };
21     eval {
22       'base'->import(qw(Huh::Boo));
23     };
24
25     ::like($@, qr/^Base class package "Huh::Boo" is empty/, 
26          'Base class empty error message');
27 }
28
29
30 {
31     use lib 't/lib';
32     
33     local $SIG{__DIE__};
34     base->import(qw(HasSigDie));
35     ok $SIG{__DIE__}, 'base.pm does not mask SIGDIE';
36 }