lib/Module/Build/t/new_from_context.t Module::Build
lib/Module/Build/t/notes.t Module::Build
lib/Module/Build/t/parents.t Module::Build
-lib/Module/Build/t/par.t Module::Build
lib/Module/Build/t/pod_parser.t Module::Build
lib/Module/Build/t/ppm.t Module::Build
lib/Module/Build/t/runthrough.t Module::Build
-lib/Module/Build/t/signature.t Module::Build
lib/Module/Build/t/test_types.t Module::Build
lib/Module/Build/t/test_type.t Module::Build
lib/Module/Build/t/tilde.t Module::Build
+++ /dev/null
-#!/usr/bin/perl -w
-
-use strict;
-use lib $ENV{PERL_CORE} ? '../lib/Module/Build/t/lib' : 't/lib';
-use MBTest;
-use Module::Build;
-use Module::Build::ConfigData;
-
-{
- my ($have_c_compiler, $C_support_feature) = check_compiler();
- if (! $C_support_feature) {
- plan skip_all => 'C_support not enabled';
- } elsif ( ! $have_c_compiler ) {
- plan skip_all => 'C_support enabled, but no compiler found';
- } elsif ( ! eval {require PAR::Dist; PAR::Dist->VERSION(0.17)} ) {
- plan skip_all => "PAR::Dist 0.17 or up not installed to check .par's.";
- } elsif ( ! eval {require Archive::Zip} ) {
- plan skip_all => "Archive::Zip required.";
- } else {
- plan tests => 3;
- }
-}
-
-
-use Cwd ();
-my $cwd = Cwd::cwd;
-my $tmp = File::Spec->catdir( $cwd, 't', '_tmp' );
-
-
-use DistGen;
-my $dist = DistGen->new( dir => $tmp, xs => 1 );
-$dist->add_file( 'hello', <<'---' );
-#!perl -w
-print "Hello, World!\n";
-__END__
-
-=pod
-
-=head1 NAME
-
-hello
-
-=head1 DESCRIPTION
-
-Says "Hello"
-
-=cut
----
-$dist->change_file( 'Build.PL', <<"---" );
-
-my \$build = new Module::Build(
- module_name => @{[$dist->name]},
- version => '0.01',
- license => 'perl',
- scripts => [ 'hello' ],
-);
-
-\$build->create_build_script;
----
-$dist->regen;
-
-chdir( $dist->dirname ) or die "Can't chdir to '@{[$dist->dirname]}': $!";
-
-use File::Spec::Functions qw(catdir);
-
-use Module::Build;
-my @installstyle = qw(lib perl5);
-my $mb = Module::Build->new_from_context(
- verbose => 0,
- quiet => 1,
-
- installdirs => 'site',
-);
-
-my $filename = $mb->dispatch('pardist');
-
-ok( -f $filename, '.par distributions exists' );
-my $distname = $dist->name;
-ok( $filename =~ /^\Q$distname\E/, 'Distribution name seems correct' );
-
-my $meta;
-eval { $meta = PAR::Dist::get_meta($filename) };
-
-ok(
- (not $@ and defined $meta and not $meta eq ''),
- 'Distribution contains META.yml'
-);
-
-$dist->clean();
-
-chdir( $cwd );
-use File::Path;
-rmtree( $tmp );
-
+++ /dev/null
-#!/usr/bin/perl -w
-
-use strict;
-use lib $ENV{PERL_CORE} ? '../lib/Module/Build/t/lib' : 't/lib';
-use MBTest;
-
-if ( $ENV{TEST_SIGNATURE} ) {
- if ( have_module( 'Module::Signature' ) ) {
- plan tests => 7;
- } else {
- plan skip_all => '$ENV{TEST_SIGNATURE} is set, but Module::Signature not found';
- }
-} else {
- plan skip_all => '$ENV{TEST_SIGNATURE} is not set';
-}
-
-#########################
-
-use Cwd ();
-my $cwd = Cwd::cwd;
-my $tmp = File::Spec->catdir( $cwd, 't', '_tmp' );
-
-use DistGen;
-my $dist = DistGen->new( dir => $tmp );
-$dist->change_file( 'Build.PL', <<"---" );
-use Module::Build;
-
-my \$build = new Module::Build(
- module_name => @{[$dist->name]},
- license => 'perl',
- sign => 1,
-);
-\$build->create_build_script;
----
-$dist->regen;
-
-chdir( $dist->dirname ) or die "Can't chdir to '@{[$dist->dirname]}': $!";
-
-#########################
-
-use Module::Build;
-
-my $mb = Module::Build->new_from_context;
-
-
-{
- eval {$mb->dispatch('distdir')};
- is $@, '';
- chdir( $mb->dist_dir ) or die "Can't chdir to '@{[$mb->dist_dir]}': $!";
- ok -e 'SIGNATURE';
-
- # Make sure the signature actually verifies
- ok Module::Signature::verify() == Module::Signature::SIGNATURE_OK();
- chdir( $dist->dirname ) or die "Can't chdir to '@{[$dist->dirname]}': $!";
-}
-
-{
- # Fake out Module::Signature and Module::Build - the first one to
- # run should be distmeta.
- my @run_order;
- {
- local $^W; # Skip 'redefined' warnings
- local *Module::Signature::sign = sub { push @run_order, 'sign' };
- local *Module::Build::Base::ACTION_distmeta = sub { push @run_order, 'distmeta' };
- eval { $mb->dispatch('distdir') };
- }
- is $@, '';
- is $run_order[0], 'distmeta';
- is $run_order[1], 'sign';
-}
-
-eval { $mb->dispatch('realclean') };
-is $@, '';
-
-
-# cleanup
-chdir( $cwd ) or die "Can''t chdir to '$cwd': $!";
-$dist->remove;
-
-use File::Path;
-rmtree( $tmp );