Update parent to CPAN version 0.223
[p5sagit/p5-mst-13.2.git] / ext / parent / t / parent-pmc.t
CommitLineData
d3153aa4 1#!/usr/bin/perl -w
2BEGIN {
3 if( $ENV{PERL_CORE} ) {
4 chdir 't' if -d 't';
5 chdir '../lib/parent';
6 @INC = '..';
7 }
8}
9
10use strict;
11use Test::More;
b4475de8 12use Config;
d3153aa4 13use lib 't/lib';
14
15plan skip_all => ".pmc are only available with 5.6 and later" if $] < 5.006;
b4475de8 16plan skip_all => ".pmc are disabled in this perl"
17 if $Config{ccflags} =~ /(?<!\w)-DPERL_DISABLE_PMC\b/;
d3153aa4 18plan tests => 3;
19
20use vars qw($got_here);
21
22my $res = eval q{
23 package MyTest;
24
25 use parent 'FileThatOnlyExistsAsPMC';
26
27 1
28};
29my $error = $@;
30
31is $res, 1, "Block ran until the end";
32is $error, '', "No error";
33
34my $obj = bless {}, 'FileThatOnlyExistsAsPMC';
35can_ok $obj, 'exclaim';