Commit | Line | Data |
9e998a43 |
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 | } |