ExtUtils::MakeMaker 6.55_02
[p5sagit/p5-mst-13.2.git] / lib / ExtUtils / t / pm.t
1 #!/usr/bin/perl -w
2
3 # Test that MakeMaker honors user's PM override.
4
5 BEGIN {
6     if( $ENV{PERL_CORE} ) {
7         chdir 't' if -d 't';
8         @INC = ('../lib', 'lib');
9     }
10     else {
11         unshift @INC, 't/lib';
12     }
13 }
14
15 use strict;
16 use Test::More tests => 6;
17
18 use TieOut;
19 use MakeMaker::Test::Utils;
20 use MakeMaker::Test::Setup::BFD;
21
22 use ExtUtils::MakeMaker;
23
24 chdir 't';
25
26 perl_lib();
27
28 ok( setup_recurs(), 'setup' );
29 END {
30     ok( chdir File::Spec->updir );
31     ok( teardown_recurs(), 'teardown' );
32 }
33
34 ok( chdir 'Big-Dummy', "chdir'd to Big-Dummy" ) ||
35   diag("chdir failed: $!");
36
37 ok( my $stdout = tie *STDOUT, 'TieOut' );
38
39 {
40     my $mm = WriteMakefile(
41         NAME            => 'Big::Dummy',
42         VERSION_FROM    => 'lib/Big/Dummy.pm',
43         PM              => { 'wibble' => 'woof' }
44     );
45
46     is_deeply( $mm->{PM},  { wibble => 'woof' } );
47 }