13 use Test::More tests => 20;
14 use MakeMaker::Test::Utils;
15 use MakeMaker::Test::Setup::BFD;
17 my $Is_VMS = $^O eq 'VMS';
19 my $perl = which_perl();
24 ok( setup_recurs(), 'setup' );
26 ok( chdir File::Spec->updir );
27 ok( teardown_recurs(), 'teardown' );
30 ok( chdir('Big-Dummy'), "chdir'd to Big-Dummy") || diag("chdir failed; $!");
32 my @mpl_out = run(qq{$perl Makefile.PL "INSTALL_BASE=../dummy-install"});
33 END { rmtree '../dummy-install'; }
35 cmp_ok( $?, '==', 0, 'Makefile.PL exited with zero' ) ||
38 my $makefile = makefile_name();
39 ok( grep(/^Writing $makefile for Big::Dummy/,
41 'Makefile.PL output looks right');
43 my $make = make_run();
44 run("$make"); # this is necessary due to a dmake bug.
45 my $install_out = run("$make install");
46 is( $?, 0, ' make install exited normally' ) || diag $install_out;
47 like( $install_out, qr/^Installing /m );
49 ok( -r '../dummy-install', ' install dir created' );
52 ('../dummy-install/lib/perl5/Big/Dummy.pm',
53 '../dummy-install/lib/perl5/Big/Liar.pm',
54 '../dummy-install/bin/program',
55 "../dummy-install/lib/perl5/$Config{archname}/perllocal.pod",
56 "../dummy-install/lib/perl5/$Config{archname}/auto/Big/Dummy/.packlist"
59 foreach my $file (@installed_files) {
60 ok( -e $file, " $file installed" );
61 ok( -r $file, " $file readable" );
65 # nmake outputs its damned logo
66 # Send STDERR off to oblivion.
67 open(SAVERR, ">&STDERR") or die $!;
68 open(STDERR, ">".File::Spec->devnull) or die $!;
70 my $realclean_out = run("$make realclean");
71 is( $?, 0, 'realclean' ) || diag($realclean_out);
73 open(STDERR, ">&SAVERR") or die $!;