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
1 #!/usr/bin/perl -w
2
3 BEGIN {
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 }
12 chdir 't';
13
14 use strict;
15 use Test::More tests => 7;
16
17 use MakeMaker::Test::Setup::BFD;
18 use MakeMaker::Test::Utils;
19
20 my $perl = which_perl();
21 my $make = make_run();
22 perl_lib();
23
24
25 ok( setup_recurs(), 'setup' );
26 END {
27     ok( chdir File::Spec->updir );
28     ok( teardown_recurs(), 'teardown' );
29 }
30
31 ok( chdir('Big-Dummy'), "chdir'd to Big-Dummy" ) ||
32   diag("chdir failed: $!");
33
34 my @mpl_out = run(qq{$perl Makefile.PL FIRST_MAKEFILE=jakefile});
35 cmp_ok( $?, '==', 0, 'Makefile.PL exited with zero' ) || diag @mpl_out;
36
37 ok( -e 'jakefile', 'FIRST_MAKEFILE honored' );
38
39 ok( grep(/^Writing jakefile(?:\.)? for Big::Dummy/, @mpl_out) == 1,
40                                         'Makefile.PL output looks right' );