lib/ExtUtils/t/MM_Win32.t See if ExtUtils::MM_Win32 works
lib/ExtUtils/t/oneliner.t See if MM can generate perl one-liners
lib/ExtUtils/t/Packlist.t See if Packlist works
+lib/ExtUtils/t/postamble.t See if postamble works
lib/ExtUtils/t/prefixify.t See if MakeMaker can apply a PREFIX
lib/ExtUtils/t/problems.t How MakeMaker reacts to build problems
lib/ExtUtils/t/prompt.t See if E::MM::prompt() works
-lib/ExtUtils/t/recurs.t See if recursive builds work
+lib/ExtUtils/t/recurs.t See if recursive builds work
lib/ExtUtils/t/split_command.t See if MM's xargs-like function works
lib/ExtUtils/t/testlib.t See if ExtUtils::testlib works
lib/ExtUtils/t/VERSION_FROM.t See if MakeMaker's VERSION_FROM works
t/lib/h2ph.pht Generated output from h2ph.h by h2ph, for comparison
t/lib/locale/latin1 Part of locale.t in Latin 1
t/lib/locale/utf8 Part of locale.t in UTF8
-t/lib/MakeMaker/Test/Setup/Recurs.pm MakeMaker test utilities
+t/lib/MakeMaker/Test/Setup/Recurs.pm MakeMaker test utilities
t/lib/MakeMaker/Test/Utils.pm MakeMaker test utilities
t/lib/Math/BigFloat/Subclass.pm Empty subclass of BigFloat for test
t/lib/Math/BigInt/BareCalc.pm Bigint's simulation of Calc
--- /dev/null
+#!/usr/bin/perl -w
+
+# Wherein we ensure that postamble works ok.
+
+BEGIN {
+ if( $ENV{PERL_CORE} ) {
+ chdir 't' if -d 't';
+ @INC = ('../lib', 'lib');
+ }
+ else {
+ unshift @INC, 't/lib';
+ }
+}
+
+use strict;
+use Test::More tests => 5;
+use MakeMaker::Test::Utils;
+use ExtUtils::MakeMaker;
+use TieOut;
+
+chdir 't';
+perl_lib;
+$| = 1;
+
+my $Makefile = makefile_name;
+
+ok( chdir 'Big-Dummy', q{chdir'd to Big-Dummy} ) ||
+ diag("chdir failed: $!");
+
+{
+ my $warnings = '';
+ local $SIG{__WARN__} = sub {
+ $warnings = join '', @_;
+ };
+
+ my $stdout = tie *STDOUT, 'TieOut' or die;
+ my $mm = WriteMakefile(
+ NAME => 'Big::Dummy',
+ VERSION_FROM => 'lib/Big/Dummy.pm',
+ postamble => {
+ FOO => 1,
+ BAR => "fugawazads"
+ }
+ );
+ is( $warnings, '', 'postamble argument not warned about' );
+}
+
+sub MY::postamble {
+ my($self, %extra) = @_;
+
+ is_deeply( \%extra, { FOO => 1, BAR => 'fugawazads' },
+ 'postamble args passed' );
+
+ return <<OUT;
+# This makes sure the postamble gets written
+OUT
+
+}
+
+
+ok( open(MAKEFILE, $Makefile) ) or diag "Can't open $Makefile: $!";
+{ local $/;
+ like( <MAKEFILE>, qr/^\# This makes sure the postamble gets written\n/m,
+ 'postamble added to the Makefile' );
+}