3 # Make sure EUI works with MakeMaker
6 if( $ENV{PERL_CORE} ) {
8 @INC = ('../lib', 'lib');
11 unshift @INC, 't/lib';
17 use ExtUtils::MakeMaker;
19 use Test::More tests => 15;
20 use MakeMaker::Test::Utils;
21 use MakeMaker::Test::Setup::BFD;
26 my $make = make_run();
28 # Environment variables which interfere with our testing.
29 delete @ENV{qw(PREFIX LIB MAKEFLAGS)};
33 my $perl = which_perl();
34 my $Is_VMS = $^O eq 'VMS';
40 my $Touch_Time = calibrate_mtime();
44 ok( setup_recurs(), 'setup' );
46 ok( chdir File::Spec->updir );
47 ok( teardown_recurs(), 'teardown' );
50 ok( chdir('Big-Dummy'), "chdir'd to Big-Dummy" ) ||
51 diag("chdir failed: $!");
53 my @mpl_out = run(qq{$perl Makefile.PL "PREFIX=../dummy-install"});
54 END { rmtree '../dummy-install'; }
56 cmp_ok( $?, '==', 0, 'Makefile.PL exited with zero' ) ||
59 END { unlink makefile_name(), makefile_backup() }
65 my $make_out = run($make);
66 is( $?, 0, 'make ran ok' ) ||
71 # Test 'make install VERBINST=1'
73 my $make_install_verbinst = make_macro($make, 'install', VERBINST => 1);
74 my $install_out = run($make_install_verbinst);
75 is( $?, 0, 'install' ) || diag $install_out;
76 like( $install_out, qr/^Installing /m );
77 like( $install_out, qr/^Writing /m );
79 ok( -r '../dummy-install', ' install dir created' );
82 # do it case-insensitive for non-case preserving OSs
85 # VMS likes to put dots on the end of things that don't have them.
86 $file =~ s/\.$// if $Is_VMS;
88 $files{$file} = $File::Find::name;
89 }, '../dummy-install' );
90 ok( $files{'dummy.pm'}, ' Dummy.pm installed' );
91 ok( $files{'liar.pm'}, ' Liar.pm installed' );
92 ok( $files{'program'}, ' program installed' );
93 ok( $files{'.packlist'}, ' packlist created' );
94 ok( $files{'perllocal.pod'},' perllocal.pod created' );