summaryrefslogtreecommitdiff
path: root/gnu/usr.bin/perl/cpan/parent/t/parent-classfromclassfile.t
blob: 0aa7e54295a88344a81415a0b429a31ffc53dac5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/perl -w

BEGIN {
    if( $ENV{PERL_CORE} ) {
        chdir 't' if -d 't';
        chdir '../lib/parent';
        @INC = '..';
    }
}

use strict;
use Test::More tests => 3;
use lib 't/lib';

use_ok('parent');

# Tests that a bare (non-double-colon) class still loads
# and does not get treated as a file:
eval q{package Test1; require Dummy; use parent -norequire, 'Dummy::InlineChild'; };
is $@, '', "Loading an unadorned class works";
isnt $INC{"Dummy.pm"}, undef, 'We loaded Dummy.pm';