# Wherein we ensure that postamble works ok.
BEGIN {
chdir 't' if -d 't';
}
else {
}
}
use strict;
use TieOut;
chdir 't';
$| = 1;
my $Makefile = makefile_name;
diag("chdir failed: $!");
{
my $warnings = '';
local $SIG{__WARN__} = sub {
$warnings = join '', @_;
};
my $mm = WriteMakefile(
postamble => {
FOO => 1,
BAR => "fugawazads"
}
);
}
sub MY::postamble {
my($self, %extra) = @_;
return <<OUT;
# This makes sure the postamble gets written
OUT
}
{ local $/;
like( <MAKEFILE>, qr/^\# This makes sure the postamble gets written\n/m,
'postamble added to the Makefile' );
}