1#!/usr/bin/perl -w 2 3BEGIN { 4 unshift @INC, 't/lib'; 5} 6 7use strict; 8use Config; 9use Test::More 10 $ENV{PERL_CORE} && $Config{'usecrosscompile'} 11 ? (skip_all => "no toolchain installed when cross-compiling") 12 : (tests => 9); 13 14use File::Spec; 15use File::Temp qw[tempdir]; 16use MakeMaker::Test::Setup::PL_FILES; 17use MakeMaker::Test::Utils; 18 19my $perl = which_perl(); 20my $make = make_run(); 21perl_lib(); 22 23my $tmpdir = tempdir( DIR => 't', CLEANUP => 1 ); 24chdir $tmpdir; 25 26setup; 27 28END { 29 ok( chdir File::Spec->updir ); 30 ok( teardown ); 31} 32 33ok chdir('PL_FILES-Module'); 34 35run(qq{$perl Makefile.PL}); 36cmp_ok( $?, '==', 0 ); 37 38my $make_out = run("$make"); 39is( $?, 0 ) || diag $make_out; 40 41foreach my $file (qw(single.out 1.out 2.out blib/lib/PL/Bar.pm)) { 42 ok( -e $file, "$file was created" ); 43} 44