Add ignoreprops everywhere. Update changes and bump version for release. Update MANIF...
[p5sagit/local-lib.git] / t / install.t
CommitLineData
be160790 1use strict;
2use warnings;
3use Test::More;
4BEGIN { plan skip_all => "Install Capture::Tiny to test installation"
5 unless eval { require Capture::Tiny; 1 } }
6use Capture::Tiny qw(capture);
7use File::Temp qw(tempdir);
8use File::Spec;
9use Cwd;
10use Config;
11
12plan tests => 2;
13
011371a7 14my $dir = tempdir('test_local_lib-XXXXX', DIR => Cwd::abs_path('t'), CLEANUP => 1);
be160790 15
16use local::lib ();
17local::lib->import($dir);
18
19my $orig_dir = cwd;
20SKIP: for my $dist_type (qw(EUMM MB)) {
21 chdir File::Spec->catdir($orig_dir, qw(t dist), $dist_type);
22 if ($dist_type eq 'EUMM') {
23 my ($stdout, $stderr) = capture { eval {
24 system($^X, 'Makefile.PL') && die "Makefile.PL failed";
25 system($Config{make}, 'install') && die "$Config{make} install failed";
26 } };
27 diag $stdout, $stderr if $@;
28 } else {
29 my ($stdout, $stderr) = capture { eval {
30 system($^X, 'Build.PL') && die "Build.PL failed";
31 system($^X, 'Build', 'install') && die "Build install failed";
32 } };
33 diag $stdout, $stderr if $@;
34 }
35 ok(
36 -e File::Spec->catfile(
37 $dir, qw(lib perl5), "$dist_type.pm",
38 ),
39 "$dist_type.pm installed into the correct location",
40 );
41}