1#!/usr/bin/perl -w
2
3# Test that MakeMaker honors user's PM override.
4
5BEGIN {
6    unshift @INC, 't/lib';
7}
8
9use strict;
10use Test::More tests => 6;
11
12use TieOut;
13use MakeMaker::Test::Utils;
14use MakeMaker::Test::Setup::BFD;
15
16use ExtUtils::MakeMaker;
17
18chdir 't';
19
20perl_lib();
21
22ok( setup_recurs(), 'setup' );
23END {
24    ok( chdir File::Spec->updir );
25    ok( teardown_recurs(), 'teardown' );
26}
27
28ok( chdir 'Big-Dummy', "chdir'd to Big-Dummy" ) ||
29  diag("chdir failed: $!");
30
31ok( 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}
42