basic.t revision 7c478bd95313f5f23a4c958a745db2134aa03244
# This test puts MakeMaker through the paces of a basic perl module
# build, test and installation of the Big::Fat::Dummy module.
BEGIN {
chdir 't' if -d 't';
}
else {
}
}
use strict;
use Config;
# 'make disttest' sets a bunch of environment variables which interfere
# with our testing.
$| = 1;
@mpl_out) == 1,
@mpl_out) == 1,
# -M is flakey on VMS
{
# Supress 'make manifest' noise
local $ENV{PERL_MM_MANIFEST_VERBOSE} = 0;
}
my $ppd_html;
' <SOFTPKG>' );
like( $ppd_html,
qr{^\s*<AUTHOR>Michael G Schwern <schwern\@pobox.com></AUTHOR>}m,
like( $ppd_html, qr{^\s*<DEPENDENCY NAME="strict" VERSION="0,0,0,0" />}m,
like( $ppd_html, qr{^\s*<OS NAME="$Config{osname}" />}m,
like( $ppd_html, qr{^\s*<ARCHITECTURE NAME="$Config{archname}" />}m,
my $test_out = run("$make test");
diag $test_out;
my $make_test_verbose = make_macro($make, 'test', TEST_VERBOSE => 1);
$test_out = run("$make_test_verbose");
diag $test_out;
my $install_out = run("$make install");
like( $install_out, qr/^Installing /m );
like( $install_out, qr/^Writing /m );
my %files = ();
find( sub {
# do it case-insensitive for non-case preserving OSs
$files{lc $_} = $File::Find::name;
SKIP: {
skip "VMS install targets do not preserve $(PREFIX)", 8 if $Is_VMS;
$install_out = run("$make install PREFIX=elsewhere");
like( $install_out, qr/^Installing /m );
like( $install_out, qr/^Writing /m );
%files = ();
}
SKIP: {
skip "VMS install targets do not preserve $(DESTDIR)", 10 if $Is_VMS;
$install_out = run("$make install PREFIX= DESTDIR=other");
diag $install_out;
like( $install_out, qr/^Installing /m );
like( $install_out, qr/^Writing /m );
%files = ();
my $perllocal;
find( sub {
$files{$_} = $File::Find::name;
{ local $/;
}
close PERLLOCAL;
# TODO not available in the min version of Test::Harness we require
# ok( open(PACKLIST, $files{'.packlist'} ) ) ||
# { local $/;
# }
# close PACKLIST;
}
SKIP: {
skip "VMS install targets do not preserve $(PREFIX)", 9 if $Is_VMS;
$install_out = run("$make install PREFIX=elsewhere DESTDIR=other/");
diag $install_out;
like( $install_out, qr/^Installing /m );
like( $install_out, qr/^Writing /m );
%files = ();
}
my $dist_test_out = run("$make disttest");
# Test META.yml generation
use ExtUtils::Manifest qw(maniread);
my $manifest = maniread();
# look like. :(
# Test NO_META META.yml suppression
# Test if MANIFEST is read-only.
diag($metafile_out);
'init_dirscan skipped distdir') ||
# I know we'll get ignored errors from make here, that's ok.
# Send STDERR off to oblivion.
sub _normalize {
my $hash = shift;
}
}