6 if( $ENV{PERL_CORE} ) {
8 @INC = ('../lib', 'lib');
11 unshift @INC, 't/lib';
19 use Test::More tests => 21;
20 use MakeMaker::Test::Utils;
21 use MakeMaker::Test::Setup::BFD;
23 my $Is_VMS = $^O eq 'VMS';
25 my $perl = which_perl();
30 ok( setup_recurs(), 'setup' );
32 ok( chdir File::Spec->updir );
33 ok( teardown_recurs(), 'teardown' );
36 ok( chdir('Big-Dummy'), "chdir'd to Big-Dummy") || diag("chdir failed; $!");
38 my @mpl_out = run(qq{$perl Makefile.PL "INSTALL_BASE=../dummy-install"});
39 END { rmtree '../dummy-install'; }
41 cmp_ok( $?, '==', 0, 'Makefile.PL exited with zero' ) ||
44 my $makefile = makefile_name();
45 ok( grep(/^Writing $makefile for Big::Dummy/,
47 'Makefile.PL output looks right');
49 my $make = make_run();
50 run("$make"); # this is necessary due to a dmake bug.
51 # Test 'make install VERBINST=1'
52 my $make_install_verbinst = make_macro($make, 'install', VERBINST => 1);
53 my $install_out = run($make_install_verbinst);
54 is( $?, 0, 'install' ) || diag $install_out;
55 like( $install_out, qr/^Installing /m );
56 like( $install_out, qr/^Writing /m );
58 ok( -r '../dummy-install', ' install dir created' );
61 ('../dummy-install/lib/perl5/Big/Dummy.pm',
62 '../dummy-install/lib/perl5/Big/Liar.pm',
63 '../dummy-install/bin/program',
64 "../dummy-install/lib/perl5/$Config{archname}/perllocal.pod",
65 "../dummy-install/lib/perl5/$Config{archname}/auto/Big/Dummy/.packlist"
68 foreach my $file (@installed_files) {
69 ok( -e $file, " $file installed" );
70 ok( -r $file, " $file readable" );
74 # nmake outputs its damned logo
75 # Send STDERR off to oblivion.
76 open(SAVERR, ">&STDERR") or die $!;
77 open(STDERR, ">".File::Spec->devnull) or die $!;
79 my $realclean_out = run("$make realclean");
80 is( $?, 0, 'realclean' ) || diag($realclean_out);
82 open(STDERR, ">&SAVERR") or die $!;