Upgrade to ExtUtils::MakeMaker 6.52
[p5sagit/p5-mst-13.2.git] / lib / ExtUtils / t / build_man.t
index 1b92829..9732c38 100644 (file)
@@ -15,11 +15,17 @@ BEGIN {
 use strict;
 use Test::More tests => 9;
 
+use File::Spec;
 use TieOut;
 use MakeMaker::Test::Utils;
 use MakeMaker::Test::Setup::BFD;
 
 use ExtUtils::MakeMaker;
+use ExtUtils::MakeMaker::Config;
+
+# Simulate an installation which has man page generation turned off to
+# ensure these tests will still work.
+$Config{installman3dir} = 'none';
 
 chdir 't';
 
@@ -36,12 +42,9 @@ ok( chdir 'Big-Dummy', "chdir'd to Big-Dummy" ) ||
 
 ok( my $stdout = tie *STDOUT, 'TieOut' );
 
-SKIP: {
-    use Config;
-    skip ("installman3dir is null", 1)
-       if !$Config{installman3dir} or
-           $Config{installman3dir} !~ /\S/ or
-           $Config{installman3dir} eq 'none';
+{
+    local $Config{installman3dir} = File::Spec->catdir(qw(t lib));
+
     my $mm = WriteMakefile(
         NAME            => 'Big::Dummy',
         VERSION_FROM    => 'lib/Big/Dummy.pm',
@@ -57,7 +60,7 @@ SKIP: {
         INSTALLMAN3DIR  => 'none'
     );
 
-    ok( !keys %{ $mm->{MAN3PODS} } );
+    is_deeply( $mm->{MAN3PODS}, {} );
 }