ExtUtils::MakeMaker 6.55_02
[p5sagit/p5-mst-13.2.git] / lib / ExtUtils / t / miniperl.t
1 #!/usr/bin/perl -w
2
3 # Test that we can build modules as miniperl.
4 # This mostly means no XS modules.
5
6 BEGIN {
7     if ($ENV{PERL_CORE}) {
8         chdir 't' if -d 't';
9         @INC = qw(../lib lib);
10     }
11 }
12
13 use strict;
14 use lib 't/lib';
15
16 use Test::More 'no_plan';
17
18 BEGIN {
19     ok !$INC{"ExtUtils/MakeMaker.pm"}, "MakeMaker is not yet loaded";
20 }
21
22 # Disable all XS from here on
23 use MakeMaker::Test::NoXS;
24
25 use ExtUtils::MakeMaker;
26
27 use MakeMaker::Test::Utils;
28 use MakeMaker::Test::Setup::BFD;
29
30
31 my $perl     = which_perl();
32 my $makefile = makefile_name();
33 my $make     = make_run();
34
35
36 # Setup our test environment
37 {
38     chdir 't';
39
40     perl_lib;
41
42     ok( setup_recurs(), 'setup' );
43     END {
44         ok( chdir File::Spec->updir );
45         ok( teardown_recurs(), 'teardown' );
46     }
47
48     ok( chdir('Big-Dummy'), "chdir'd to Big-Dummy" ) ||
49       diag("chdir failed: $!");
50 }
51
52
53 # Run make once
54 {
55     run_ok(qq{$perl Makefile.PL});
56     run_ok($make);
57 }