3 # Test if MakeMaker declines to build man pages under the right conditions.
6 if( $ENV{PERL_CORE} ) {
8 @INC = ('../lib', 'lib');
11 unshift @INC, 't/lib';
16 use Test::More tests => 9;
20 use MakeMaker::Test::Utils;
21 use MakeMaker::Test::Setup::BFD;
23 use ExtUtils::MakeMaker;
24 use ExtUtils::MakeMaker::Config;
26 # Simulate an installation which has man page generation turned off to
27 # ensure these tests will still work.
28 $Config{installman3dir} = 'none';
34 ok( setup_recurs(), 'setup' );
36 ok( chdir File::Spec->updir );
37 ok( teardown_recurs(), 'teardown' );
40 ok( chdir 'Big-Dummy', "chdir'd to Big-Dummy" ) ||
41 diag("chdir failed: $!");
43 ok( my $stdout = tie *STDOUT, 'TieOut' );
46 local $Config{installman3dir} = File::Spec->catdir(qw(t lib));
48 my $mm = WriteMakefile(
50 VERSION_FROM => 'lib/Big/Dummy.pm',
53 ok( keys %{ $mm->{MAN3PODS} } );
57 my $mm = WriteMakefile(
59 VERSION_FROM => 'lib/Big/Dummy.pm',
60 INSTALLMAN3DIR => 'none'
63 ok( !keys %{ $mm->{MAN3PODS} } );
68 my $mm = WriteMakefile(
70 VERSION_FROM => 'lib/Big/Dummy.pm',
74 is_deeply( $mm->{MAN3PODS}, { } );
79 my $mm = WriteMakefile(
81 VERSION_FROM => 'lib/Big/Dummy.pm',
82 MAN3PODS => { "Foo.pm" => "Foo.1" }
85 is_deeply( $mm->{MAN3PODS}, { "Foo.pm" => "Foo.1" } );