[Module-build-checkins] Module-Build/t destinations.t,1.18,1.19
Status: Beta
Brought to you by:
kwilliams
|
From: Randy W. S. <si...@us...> - 2005-06-23 08:32:41
|
Update of /cvsroot/module-build/Module-Build/t In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13862/t Modified Files: destinations.t Log Message: Use the DistGen module for tests. Index: destinations.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/destinations.t,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- destinations.t 23 Jun 2005 02:49:44 -0000 1.18 +++ destinations.t 23 Jun 2005 08:32:33 -0000 1.19 @@ -1,24 +1,32 @@ #!/usr/bin/perl -w +use lib 't/lib'; use strict; -use Config; -use File::Spec::Functions qw( catdir splitdir ); +use Test::More tests => 66; -use File::Spec; -BEGIN { - my $common_pl = File::Spec->catfile('t', 'common.pl'); - require $common_pl; -} +use File::Spec (); +my $common_pl = File::Spec->catfile( 't', 'common.pl' ); +require $common_pl; -use Test::More tests => 67; +use Cwd (); +my $cwd = Cwd::cwd; -use_ok 'Module::Build'; +use DistGen; +my $dist = DistGen->new; +$dist->regen; + +chdir( $dist->dirname ) or die "Can't chdir to '@{[$dist->dirname]}': $!"; -my $M = Module::Build->current; +use Config; +use File::Spec::Functions qw( catdir splitdir ); + + +use Module::Build; +my $M = Module::Build->new_from_context; isa_ok( $M, 'Module::Build::Base' ); my $Install_Sets = $M->install_sets; @@ -193,3 +201,7 @@ is( $mb->install_destination($type), $expect, "$type destination" ); } } + + +chdir( $cwd ) or die "Can''t chdir to '$cwd': $!"; +$dist->remove; |