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