Add CPANPLUS 0.78
[p5sagit/p5-mst-13.2.git] / lib / CPANPLUS / t / 03_CPANPLUS-Internals-Source.t
CommitLineData
6aaee015 1### make sure we can find our conf.pl file
2BEGIN {
3 use FindBin;
4 require "$FindBin::Bin/inc/conf.pl";
5}
6
7use strict;
8
9use CPANPLUS::Backend;
10
11use Test::More 'no_plan';
12use Data::Dumper;
13
14my $conf = gimme_conf();
15
16my $cb = CPANPLUS::Backend->new( $conf );
17isa_ok($cb, "CPANPLUS::Internals" );
18
19my $mt = $cb->_module_tree;
20my $at = $cb->_author_tree;
21my $modname = TEST_CONF_MODULE;
22
23for my $name (qw[auth mod dslip] ) {
24 my $file = File::Spec->catfile(
25 $conf->get_conf('base'),
26 $conf->_get_source($name)
27 );
28 ok( (-e $file && -f _ && -s _), "$file exists" );
29}
30
31ok( scalar keys %$at, "Authortree loaded successfully" );
32ok( scalar keys %$mt, "Moduletree loaded successfully" );
33
34my $auth = $at->{'EUNOXS'};
35my $mod = $mt->{$modname};
36
37isa_ok( $auth, 'CPANPLUS::Module::Author' );
38isa_ok( $mod, 'CPANPLUS::Module' );
39
40# Local variables:
41# c-indentation-style: bsd
42# c-basic-offset: 4
43# indent-tabs-mode: nil
44# End:
45# vim: expandtab shiftwidth=4: