diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2010-09-24 14:48:59 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2010-09-24 14:48:59 +0000 |
commit | 0d94a27bd4d93467c5569c05f5ba5f55df50de6c (patch) | |
tree | 5f41a557396d2dfef25fcd19d23d185d880807fb /gnu | |
parent | c90c93229d760707df8036942f83efcaccdb3b90 (diff) |
Perl 5.12.2 from CPAN
Diffstat (limited to 'gnu')
-rwxr-xr-x | gnu/usr.bin/perl/cpan/ExtUtils-MakeMaker/t/build_man.t | 35 |
1 files changed, 16 insertions, 19 deletions
diff --git a/gnu/usr.bin/perl/cpan/ExtUtils-MakeMaker/t/build_man.t b/gnu/usr.bin/perl/cpan/ExtUtils-MakeMaker/t/build_man.t index a88ccd23f18..d4649e7598c 100755 --- a/gnu/usr.bin/perl/cpan/ExtUtils-MakeMaker/t/build_man.t +++ b/gnu/usr.bin/perl/cpan/ExtUtils-MakeMaker/t/build_man.t @@ -7,10 +7,9 @@ BEGIN { } use strict; -use Test::More tests => 10; +use Test::More tests => 9; use File::Spec; -use File::Temp qw[tempdir]; use TieOut; use MakeMaker::Test::Utils; use MakeMaker::Test::Setup::BFD; @@ -23,36 +22,29 @@ use ExtUtils::MakeMaker::Config; $Config{installman3dir} = 'none'; chdir 't'; -perl_lib; # sets $ENV{PERL5LIB} relative to t/ -my $tmpdir = tempdir( DIR => '../t', CLEANUP => 1 ); -use Cwd; my $cwd = getcwd; END { chdir $cwd } # so File::Temp can cleanup -chdir $tmpdir; +perl_lib(); ok( setup_recurs(), 'setup' ); END { - ok chdir File::Spec->updir, 'chdir updir'; - ok teardown_recurs(), 'teardown'; + ok( chdir File::Spec->updir ); + ok( teardown_recurs(), 'teardown' ); } ok( chdir 'Big-Dummy', "chdir'd to Big-Dummy" ) || diag("chdir failed: $!"); -my $README = 'README.pod'; -{ open my $fh, '>', $README or die "$README: $!"; } -ok((my $stdout = tie *STDOUT, 'TieOut'), 'tie stdout'); +ok( my $stdout = tie *STDOUT, 'TieOut' ); { local $Config{installman3dir} = File::Spec->catdir(qw(t lib)); + my $mm = WriteMakefile( NAME => 'Big::Dummy', VERSION_FROM => 'lib/Big/Dummy.pm', ); - my %got = %{ $mm->{MAN3PODS} }; - # because value too OS-specific - my $delete_key = $^O eq 'VMS' ? '[.lib.Big]Dummy.pm' : 'lib/Big/Dummy.pm'; - ok delete($got{$delete_key}), 'normal man3pod'; - is_deeply \%got, {}, 'no extra man3pod'; + + ok( keys %{ $mm->{MAN3PODS} } ); } { @@ -61,23 +53,28 @@ ok((my $stdout = tie *STDOUT, 'TieOut'), 'tie stdout'); VERSION_FROM => 'lib/Big/Dummy.pm', INSTALLMAN3DIR => 'none' ); - is_deeply $mm->{MAN3PODS}, {}, 'suppress man3pod with "none"'; + + is_deeply( $mm->{MAN3PODS}, {} ); } + { my $mm = WriteMakefile( NAME => 'Big::Dummy', VERSION_FROM => 'lib/Big/Dummy.pm', MAN3PODS => {} ); - is_deeply $mm->{MAN3PODS}, {}, 'suppress man3pod with {}'; + + is_deeply( $mm->{MAN3PODS}, { } ); } + { my $mm = WriteMakefile( NAME => 'Big::Dummy', VERSION_FROM => 'lib/Big/Dummy.pm', MAN3PODS => { "Foo.pm" => "Foo.1" } ); - is_deeply $mm->{MAN3PODS}, { "Foo.pm" => "Foo.1" }, 'override man3pod'; + + is_deeply( $mm->{MAN3PODS}, { "Foo.pm" => "Foo.1" } ); } |