3 # Wherein we ensure that postamble works ok.
6 if( $ENV{PERL_CORE} ) {
8 @INC = ('../lib', 'lib');
11 unshift @INC, 't/lib';
16 use Test::More tests => 5;
17 use MakeMaker::Test::Utils;
18 use ExtUtils::MakeMaker;
25 my $Makefile = makefile_name;
27 ok( chdir 'Big-Dummy', q{chdir'd to Big-Dummy} ) ||
28 diag("chdir failed: $!");
32 local $SIG{__WARN__} = sub {
33 $warnings = join '', @_;
36 my $stdout = tie *STDOUT, 'TieOut' or die;
37 my $mm = WriteMakefile(
39 VERSION_FROM => 'lib/Big/Dummy.pm',
45 is( $warnings, '', 'postamble argument not warned about' );
49 my($self, %extra) = @_;
51 is_deeply( \%extra, { FOO => 1, BAR => 'fugawazads' },
52 'postamble args passed' );
55 # This makes sure the postamble gets written
61 ok( open(MAKEFILE, $Makefile) ) or diag "Can't open $Makefile: $!";
63 like( <MAKEFILE>, qr/^\# This makes sure the postamble gets written\n/m,
64 'postamble added to the Makefile' );