This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
document fixing of #119927 (localizing $\) in 5.18.0
[perl5.git] / cpan / ExtUtils-MakeMaker / t / xs.t
CommitLineData
7292dc67
RGS
1#!/usr/bin/perl -w
2
3BEGIN {
b78fd716 4 unshift @INC, 't/lib/';
7292dc67
RGS
5}
6chdir 't';
7
5bdf71cc
RGS
8use strict;
9
7292dc67
RGS
10use Test::More;
11use MakeMaker::Test::Utils;
c8d65f10
RGS
12use MakeMaker::Test::Setup::XS;
13use File::Find;
14use File::Spec;
15use File::Path;
7292dc67 16
5bdf71cc 17my $Skipped = 0;
7292dc67 18if( have_compiler() ) {
a592ba15 19 plan tests => 5;
7292dc67
RGS
20}
21else {
5bdf71cc 22 $Skipped = 1;
7292dc67
RGS
23 plan skip_all => "ExtUtils::CBuilder not installed or couldn't find a compiler";
24}
25
c8d65f10
RGS
26my $Is_VMS = $^O eq 'VMS';
27my $perl = which_perl();
28
c8d65f10
RGS
29chdir 't';
30
31perl_lib;
32
33$| = 1;
34
35ok( setup_xs(), 'setup' );
36END {
5bdf71cc
RGS
37 unless( $Skipped ) {
38 chdir File::Spec->updir or die;
39 teardown_xs(), 'teardown' or die;
40 }
c8d65f10
RGS
41}
42
43ok( chdir('XS-Test'), "chdir'd to XS-Test" ) ||
44 diag("chdir failed: $!");
45
46my @mpl_out = run(qq{$perl Makefile.PL});
47
48cmp_ok( $?, '==', 0, 'Makefile.PL exited with zero' ) ||
49 diag(@mpl_out);
50
51my $make = make_run();
52my $make_out = run("$make");
eb7cfb31 53is( $?, 0, ' make exited normally' ) ||
c8d65f10
RGS
54 diag $make_out;
55
78fd4358 56my $test_out = run("$make test");
eb7cfb31 57is( $?, 0, ' make test exited normally' ) ||
c8d65f10 58 diag $test_out;