This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Fix warning.
[perl5.git] / lib / ExtUtils / t / pm.t
CommitLineData
58d32538
RGS
1#!/usr/bin/perl -w
2
3# Test that MakeMaker honors user's PM override.
4
5BEGIN {
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
15use strict;
16use Test::More tests => 6;
17
18use TieOut;
19use MakeMaker::Test::Utils;
20use MakeMaker::Test::Setup::BFD;
21
22use ExtUtils::MakeMaker;
23
24chdir 't';
25
26perl_lib();
27
28ok( setup_recurs(), 'setup' );
29END {
30 ok( chdir File::Spec->updir );
31 ok( teardown_recurs(), 'teardown' );
32}
33
34ok( chdir 'Big-Dummy', "chdir'd to Big-Dummy" ) ||
35 diag("chdir failed: $!");
36
37ok( 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}