This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Fix warning.
[perl5.git] / lib / ExtUtils / t / FIRST_MAKEFILE.t
CommitLineData
4325052d
RGS
1#!/usr/bin/perl -w
2
41e5fcb0
RGS
3BEGIN {
4 if( $ENV{PERL_CORE} ) {
5 chdir 't' if -d 't';
6 @INC = ('../lib', 'lib');
7 }
8 else {
9 unshift @INC, 't/lib';
10 }
11}
12chdir 't';
13
14use strict;
4325052d 15use Test::More tests => 7;
41e5fcb0
RGS
16
17use MakeMaker::Test::Setup::BFD;
18use MakeMaker::Test::Utils;
19
20my $perl = which_perl();
21my $make = make_run();
22perl_lib();
23
24
25ok( setup_recurs(), 'setup' );
26END {
27 ok( chdir File::Spec->updir );
28 ok( teardown_recurs(), 'teardown' );
29}
30
31ok( chdir('Big-Dummy'), "chdir'd to Big-Dummy" ) ||
32 diag("chdir failed: $!");
33
34my @mpl_out = run(qq{$perl Makefile.PL FIRST_MAKEFILE=jakefile});
35cmp_ok( $?, '==', 0, 'Makefile.PL exited with zero' ) || diag @mpl_out;
36
37ok( -e 'jakefile', 'FIRST_MAKEFILE honored' );
38
d04fb41e 39ok( grep(/^Writing jakefile(?:\.)? for Big::Dummy/, @mpl_out) == 1,
41e5fcb0 40 'Makefile.PL output looks right' );