3 # Wherein we ensure that postamble works ok.
10 use Test::More tests => 8;
11 use MakeMaker::Test::Utils;
12 use MakeMaker::Test::Setup::BFD;
13 use ExtUtils::MakeMaker;
20 my $Makefile = makefile_name;
22 ok( setup_recurs(), 'setup' );
24 ok( chdir File::Spec->updir );
25 ok( teardown_recurs(), 'teardown' );
28 ok( chdir 'Big-Dummy', q{chdir'd to Big-Dummy} ) ||
29 diag("chdir failed: $!");
33 local $SIG{__WARN__} = sub {
34 $warnings = join '', @_;
37 my $stdout = tie *STDOUT, 'TieOut' or die;
38 my $mm = WriteMakefile(
40 VERSION_FROM => 'lib/Big/Dummy.pm',
46 is( $warnings, '', 'postamble argument not warned about' );
50 my($self, %extra) = @_;
52 is_deeply( \%extra, { FOO => 1, BAR => 'fugawazads' },
53 'postamble args passed' );
56 # This makes sure the postamble gets written
62 ok( open(MAKEFILE, $Makefile) ) or diag "Can't open $Makefile: $!";
64 like( <MAKEFILE>, qr/^\# This makes sure the postamble gets written\n/m,
65 'postamble added to the Makefile' );