3 # Test if MakeMaker declines to build man pages under the right conditions.
10 use Test::More tests => 9;
14 use MakeMaker::Test::Utils;
15 use MakeMaker::Test::Setup::BFD;
17 use ExtUtils::MakeMaker;
18 use ExtUtils::MakeMaker::Config;
20 # Simulate an installation which has man page generation turned off to
21 # ensure these tests will still work.
22 $Config{installman3dir} = 'none';
28 ok( setup_recurs(), 'setup' );
30 ok( chdir File::Spec->updir );
31 ok( teardown_recurs(), 'teardown' );
34 ok( chdir 'Big-Dummy', "chdir'd to Big-Dummy" ) ||
35 diag("chdir failed: $!");
37 ok( my $stdout = tie *STDOUT, 'TieOut' );
40 local $Config{installman3dir} = File::Spec->catdir(qw(t lib));
42 my $mm = WriteMakefile(
44 VERSION_FROM => 'lib/Big/Dummy.pm',
47 ok( keys %{ $mm->{MAN3PODS} } );
51 my $mm = WriteMakefile(
53 VERSION_FROM => 'lib/Big/Dummy.pm',
54 INSTALLMAN3DIR => 'none'
57 is_deeply( $mm->{MAN3PODS}, {} );
62 my $mm = WriteMakefile(
64 VERSION_FROM => 'lib/Big/Dummy.pm',
68 is_deeply( $mm->{MAN3PODS}, { } );
73 my $mm = WriteMakefile(
75 VERSION_FROM => 'lib/Big/Dummy.pm',
76 MAN3PODS => { "Foo.pm" => "Foo.1" }
79 is_deeply( $mm->{MAN3PODS}, { "Foo.pm" => "Foo.1" } );