module-build-checkins Mailing List for Module::Build (Page 23)
Status: Beta
Brought to you by:
kwilliams
You can subscribe to this list here.
| 2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(82) |
Dec
(58) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2005 |
Jan
(49) |
Feb
(57) |
Mar
(49) |
Apr
(49) |
May
(2) |
Jun
(147) |
Jul
(60) |
Aug
(55) |
Sep
(51) |
Oct
(68) |
Nov
(61) |
Dec
(44) |
| 2006 |
Jan
(27) |
Feb
(38) |
Mar
(89) |
Apr
(31) |
May
(17) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Randy W. S. <si...@us...> - 2005-06-28 10:15:10
|
Update of /cvsroot/module-build/Module-Build/t/Sample/lib/Sample In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7714/t/Sample/lib/Sample Removed Files: Docs.pod NoPod.pm Script.PL Log Message: Remove 't/Sample' testing distribution in favor of using dynamically generated dists with DistGen.pm --- Script.PL DELETED --- --- NoPod.pm DELETED --- --- Docs.pod DELETED --- |
|
From: Randy W. S. <si...@us...> - 2005-06-28 10:15:10
|
Update of /cvsroot/module-build/Module-Build/t/Sample/bin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7714/t/Sample/bin Removed Files: sample.pl Log Message: Remove 't/Sample' testing distribution in favor of using dynamically generated dists with DistGen.pm --- sample.pl DELETED --- |
|
From: Randy W. S. <si...@us...> - 2005-06-28 10:15:10
|
Update of /cvsroot/module-build/Module-Build/t/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7714/t/lib Removed Files: ModuleBuildOne.pm Log Message: Remove 't/Sample' testing distribution in favor of using dynamically generated dists with DistGen.pm --- ModuleBuildOne.pm DELETED --- |
|
From: Randy W. S. <si...@us...> - 2005-06-28 10:15:10
|
Update of /cvsroot/module-build/Module-Build/t/Sample/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7714/t/Sample/lib Removed Files: Sample.pm Log Message: Remove 't/Sample' testing distribution in favor of using dynamically generated dists with DistGen.pm --- Sample.pm DELETED --- |
|
From: Randy W. S. <si...@us...> - 2005-06-28 10:15:10
|
Update of /cvsroot/module-build/Module-Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7714 Modified Files: MANIFEST Log Message: Remove 't/Sample' testing distribution in favor of using dynamically generated dists with DistGen.pm Index: MANIFEST =================================================================== RCS file: /cvsroot/module-build/Module-Build/MANIFEST,v retrieving revision 1.45 retrieving revision 1.46 diff -u -d -r1.45 -r1.46 --- MANIFEST 23 Jun 2005 10:59:09 -0000 1.45 +++ MANIFEST 28 Jun 2005 10:14:57 -0000 1.46 @@ -39,7 +39,6 @@ t/files.t t/install.t t/lib/DistGen.pm -t/lib/ModuleBuildOne.pm t/lib/Test/Builder.pm t/lib/Test/More.pm t/lib/Test/Simple.pm @@ -49,17 +48,6 @@ t/parents.t t/pod_parser.t t/runthrough.t -t/Sample/bin/sample.pl -t/Sample/Build.PL -t/Sample/lib/Sample.pm -t/Sample/lib/Sample/Docs.pod -t/Sample/lib/Sample/NoPod.pm -t/Sample/lib/Sample/Script.PL -t/Sample/MANIFEST -t/Sample/META.yml -t/Sample/script -t/Sample/test.foo -t/Sample/test.pl t/signature.t t/tilde.t t/versions.t |
|
From: Randy W. S. <si...@us...> - 2005-06-28 10:15:10
|
Update of /cvsroot/module-build/Module-Build/t/Sample In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7714/t/Sample Removed Files: .cvsignore Build.PL MANIFEST script test.foo test.pl Log Message: Remove 't/Sample' testing distribution in favor of using dynamically generated dists with DistGen.pm --- .cvsignore DELETED --- --- test.pl DELETED --- --- test.foo DELETED --- --- script DELETED --- --- Build.PL DELETED --- --- MANIFEST DELETED --- |
|
From: Randy W. S. <si...@us...> - 2005-06-28 10:03:04
|
Update of /cvsroot/module-build/Module-Build/t In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2303/t Modified Files: runthrough.t Log Message: Use the DistGen module for tests. Index: runthrough.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/runthrough.t,v retrieving revision 1.53 retrieving revision 1.54 diff -u -d -r1.53 -r1.54 --- runthrough.t 28 Jun 2005 05:25:49 -0000 1.53 +++ runthrough.t 28 Jun 2005 10:02:38 -0000 1.54 @@ -5,15 +5,63 @@ use Test::More tests => 28; +my $have_yaml = Module::Build->current->feature('YAML_support'); + use File::Spec (); my $common_pl = File::Spec->catfile( 't', 'common.pl' ); require $common_pl; +######################### + use Cwd (); my $cwd = Cwd::cwd; +use DistGen; +my $dist = DistGen->new; +$dist->remove_file( 't/basic.t' ); +$dist->change_file( 'Build.PL', <<'---' ); +use Module::Build; + +my $build = new Module::Build( + module_name => 'Simple', + scripts => [ 'script' ], + license => 'perl', + requires => { 'File::Spec' => 0 }, +); +$build->create_build_script; +--- +$dist->add_file( 'script', <<'---' ); +#!perl -w +print "Hello, World!\n"; +--- +$dist->add_file( 'test.pl', <<'---' ); +#!/usr/bin/perl + +use Test; +plan tests => 2; + +ok 1; + +require Module::Build; +ok $INC{'Module/Build.pm'}, qr/blib/, 'Module::Build should be loaded from blib'; +print "# Cwd: ", Module::Build->cwd, "\n"; +print "# \@INC: (@INC)\n"; +print "Done.\n"; # t/compat.t looks for this +--- +$dist->add_file( 'lib/Simple/Script.PL', <<'---' ); +#!perl -w + +my $filename = shift; +open FH, "> $filename" or die "Can't create $filename: $!"; +print FH "Contents: $filename\n"; +close FH; +--- +$dist->regen; + +chdir( $dist->dirname ) or die "Can't chdir to '@{[$dist->dirname]}': $!"; + ######################### use Module::Build; @@ -23,15 +71,7 @@ ######################### -my $have_yaml = Module::Build->current->feature('YAML_support'); - -my $start_dir = Module::Build->cwd; - -# Would be nice to just have a 'base_dir' parameter for M::B->new() -my $goto = File::Spec->catdir( $start_dir, 't', 'Sample' ); -chdir $goto or die "can't chdir to $goto: $!"; - -my $build = Module::Build->new_from_context(); +my $build = Module::Build->new_from_context; ok $build; is $build->license, 'perl'; @@ -42,7 +82,7 @@ ok ! $@; ok -e $build->build_script; -is $build->dist_dir, 'Sample-0.01'; +is $build->dist_dir, 'Simple-0.01'; # The 'cleanup' file doesn't exist yet ok grep {$_ eq 'before_script'} $build->cleanup; @@ -59,15 +99,15 @@ ok ! $@; like $output, qr/all tests successful/i; -# This is the output of lib/Sample/Script.PL -ok -e $build->localize_file_path('lib/Sample/Script'); +# This is the output of lib/Simple/Script.PL +ok -e $build->localize_file_path('lib/Simple/Script'); # We prefix all lines with "| " so Test::Harness doesn't get confused. -print "vvvvvvvvvvvvvvvvvvvvv Sample/test.pl output vvvvvvvvvvvvvvvvvvvvv\n"; +print "vvvvvvvvvvvvvvvvvvvvv Simple/test.pl output vvvvvvvvvvvvvvvvvvvvv\n"; $output =~ s/^/| /mg; print $output; -print "^^^^^^^^^^^^^^^^^^^^^ Sample/test.pl output ^^^^^^^^^^^^^^^^^^^^^\n"; +print "^^^^^^^^^^^^^^^^^^^^^ Simple/test.pl output ^^^^^^^^^^^^^^^^^^^^^\n"; SKIP: { skip( 'YAML_support feature is not enabled', 7 ) unless $have_yaml; @@ -76,20 +116,20 @@ ok ! $@; # After a test, the distdir should contain a blib/ directory - ok -e File::Spec->catdir('Sample-0.01', 'blib'); + ok -e File::Spec->catdir('Simple-0.01', 'blib'); eval {$build->dispatch('distdir')}; ok ! $@; # The 'distdir' should contain a lib/ directory - ok -e File::Spec->catdir('Sample-0.01', 'lib'); + ok -e File::Spec->catdir('Simple-0.01', 'lib'); # The freshly run 'distdir' should never contain a blib/ directory, or # else it could get into the tarball - ok ! -e File::Spec->catdir('Sample-0.01', 'blib'); + ok ! -e File::Spec->catdir('Simple-0.01', 'blib'); # Make sure all of the above was done by the new version of Module::Build - my $fh = IO::File->new(File::Spec->catfile($goto, 'META.yml')); + my $fh = IO::File->new(File::Spec->catfile($dist->dirname, 'META.yml')); my $contents = do {local $/; <$fh>}; $contents =~ /Module::Build version ([0-9_.]+)/m; is $1, $build->VERSION, "Check version used to create META.yml: $1 == " . $build->VERSION; @@ -126,16 +166,16 @@ # Check PPD $build->dispatch('ppd', args => {codebase => '/path/to/codebase'}); - my $ppd = slurp('Sample.ppd'); + my $ppd = slurp('Simple.ppd'); # This test is quite a hack since with XML you don't really want to # do a strict string comparison, but absent an XML parser it's the # best we can do. is $ppd, <<'EOF'; -<SOFTPKG NAME="Sample" VERSION="0,01,0,0"> - <TITLE>Sample</TITLE> - <ABSTRACT>Foo foo sample foo</ABSTRACT> - <AUTHOR>Sample Man <sa...@ex...></AUTHOR> +<SOFTPKG NAME="Simple" VERSION="0,01,0,0"> + <TITLE>Simple</TITLE> + <ABSTRACT>Perl extension for blah blah blah</ABSTRACT> + <AUTHOR>A. U. Thor, a.u.thor@a.galaxy.far.far.away</AUTHOR> <IMPLEMENTATION> <DEPENDENCY NAME="File-Spec" VERSION="0,0,0,0" /> <CODEBASE HREF="/path/to/codebase" /> @@ -151,3 +191,8 @@ ok ! -e $build->build_script; ok ! -e $build->config_dir; ok ! -e $build->dist_dir; + + +# cleanup +chdir( $cwd ) or die "Can''t chdir to '$cwd': $!"; +$dist->remove; |
|
From: Randy W. S. <si...@us...> - 2005-06-28 09:40:58
|
Update of /cvsroot/module-build/Module-Build/t In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23642/t Modified Files: manifypods.t Log Message: Use the DistGen module for tests. Index: manifypods.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/manifypods.t,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- manifypods.t 28 Jun 2005 03:47:33 -0000 1.11 +++ manifypods.t 28 Jun 2005 09:40:50 -0000 1.12 @@ -7,14 +7,12 @@ my $common_pl = File::Spec->catfile( 't', 'common.pl' ); require $common_pl; -use Cwd (); -my $cwd = Cwd::cwd; ######################### use Test::More; - use Module::Build; + if ( Module::Build->current->feature('manpage_support') ) { plan tests => 21; } else { @@ -23,17 +21,62 @@ ######################### -use File::Path qw( rmtree ); -my $install = File::Spec->catdir( $cwd, 't', '_tmp' ); -chdir File::Spec->catdir( 't','Sample' ) or die "Can't chdir to t/Sample: $!"; +use Cwd (); +my $cwd = Cwd::cwd; + + +use DistGen; +my $dist = DistGen->new; +$dist->add_file( 'bin/nopod.pl', <<'---' ); +#!perl -w +print "sample script without pod to test manifypods action\n"; +--- +$dist->add_file( 'bin/haspod.pl', <<'---' ); +#!perl -w +print "Hello, world"; + +__END__ + +=head1 NAME + +haspod.pl - sample script with pod to test manifypods action + +=cut +--- +$dist->add_file( 'lib/Simple/NoPod.pm', <<'---' ); +package Simple::NoPod; +1; +--- +$dist->add_file( 'lib/Simple/AllPod.pod', <<'---' ); +=head1 NAME + +Simple::AllPod - Pure POD + +=head1 AUTHOR + +Simple Man <si...@ex...> + +=cut +--- +$dist->regen; + + +chdir( $dist->dirname ) or die "Can't chdir to '@{[$dist->dirname]}': $!"; + + +my $destdir = File::Spec->catdir($cwd, 't', 'install_test'); + + +my $m = Module::Build->new( + install_base => $destdir, + module_name => $dist->name, + scripts => [ File::Spec->catfile( 'bin', 'nopod.pl' ), + File::Spec->catfile( 'bin', 'haspod.pl' ) ], +); + +$m->add_to_cleanup($destdir); -my $m = new Module::Build - ( - install_base => $install, - module_name => 'Sample', - scripts => [ 'script', File::Spec->catfile( 'bin', 'sample.pl' ) ], - ); is( ref $m->{properties}->{bindoc_dirs}, 'ARRAY', 'bindoc_dirs' ); is( ref $m->{properties}->{libdoc_dirs}, 'ARRAY', 'libdoc_dirs' ); @@ -47,13 +90,13 @@ ); my %distro = ( - 'bin/sample.pl' => "sample.pl.$man{ext1}", - 'lib/Sample/Docs.pod' => "Sample$man{sep}Docs.$man{ext3}", - 'lib/Sample.pm' => "Sample.$man{ext3}", - 'script' => '', - 'lib/Sample/NoPod.pm' => '', + 'bin/nopod.pl' => '', + 'bin/haspod.pl' => "haspod.pl.$man{ext1}", + 'lib/Simple.pm' => "Simple.$man{ext3}", + 'lib/Simple/NoPod.pm' => '', + 'lib/Simple/AllPod.pod' => "Simple$man{sep}AllPod.$man{ext3}", ); -# foreach(keys %foo) doesn't give proper lvalues on 5.005, so we use the ugly way + %distro = map {$m->localize_file_path($_), $distro{$_}} keys %distro; $m->dispatch('build'); @@ -73,23 +116,29 @@ } -$m->add_to_cleanup($install); $m->dispatch('install'); while (my ($from, $v) = each %distro) { next unless $v; - my $to = File::Spec->catfile($install, 'man', $man{($from =~ /^lib/ ? 'dir3' : 'dir1')}, $v); + my $to = File::Spec->catfile($destdir, 'man', $man{($from =~ /^lib/ ? 'dir3' : 'dir1')}, $v); ok -e $to, "Created $to manpage"; } $m->dispatch('realclean'); -my $m2 = new Module::Build - ( - module_name => 'Sample', - libdoc_dirs => [qw( foo bar baz )], - ); +# revert to a pristine state +chdir( $cwd ) or die "Can''t chdir to '$cwd': $!"; +$dist->remove; +$dist = DistGen->new; +$dist->regen; +chdir( $dist->dirname ) or die "Can't chdir to '@{[$dist->dirname]}': $!"; + + +my $m2 = Module::Build->new( + module_name => $dist->name, + libdoc_dirs => [qw( foo bar baz )], +); is( $m2->{properties}->{libdoc_dirs}->[0], 'foo', 'override libdoc_dirs' ); @@ -103,3 +152,8 @@ like $docs, qr/=item $_/; unlike $docs, qr/\n=/, $docs; } + + +# cleanup +chdir( $cwd ) or die "Can''t chdir to '$cwd': $!"; +$dist->remove; |
|
From: Randy W. S. <si...@us...> - 2005-06-28 07:33:41
|
Update of /cvsroot/module-build/Module-Build/t In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18982/t Modified Files: compat.t files.t notes.t tilde.t versions.t xs.t Log Message: Update cleanup code. Index: files.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/files.t,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- files.t 23 Jun 2005 08:44:47 -0000 1.5 +++ files.t 28 Jun 2005 07:33:32 -0000 1.6 @@ -53,5 +53,6 @@ ok -e $file2; } +# cleanup chdir( $cwd ) or die "Can''t chdir to '$cwd': $!"; $dist->remove; Index: versions.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/versions.t,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- versions.t 28 Jun 2005 04:02:44 -0000 1.5 +++ versions.t 28 Jun 2005 07:33:32 -0000 1.6 @@ -19,3 +19,7 @@ is( Module::Build->version_from_file( $file ), '0.01', 'version_from_file' ); ok( Module::Build->compare_versions( '1.01_01', '>', '1.01' ), 'compare: 1.0_01 > 1.0' ); + + +# cleanup +$dist->remove; Index: compat.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/compat.t,v retrieving revision 1.27 retrieving revision 1.28 diff -u -d -r1.27 -r1.28 --- compat.t 28 Jun 2005 03:36:45 -0000 1.27 +++ compat.t 28 Jun 2005 07:33:32 -0000 1.28 @@ -192,3 +192,8 @@ ok ! -e 'Makefile', "Makefile shouldn't exist"; } } + + +# cleanup +chdir( $cwd ) or die "Can''t chdir to '$cwd': $!"; +$dist->remove; Index: notes.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/notes.t,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- notes.t 23 Jun 2005 08:44:47 -0000 1.11 +++ notes.t 28 Jun 2005 07:33:32 -0000 1.12 @@ -61,5 +61,6 @@ is $m->notes('foo'), 'bar'; +# cleanup chdir( $cwd ) or die "Can''t chdir to '$cwd': $!"; $dist->remove; Index: tilde.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/tilde.t,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- tilde.t 23 Jun 2005 08:44:48 -0000 1.8 +++ tilde.t 28 Jun 2005 07:33:32 -0000 1.9 @@ -78,5 +78,6 @@ } +# cleanup chdir( $cwd ) or die "Can''t chdir to '$cwd': $!"; $dist->remove; Index: xs.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/xs.t,v retrieving revision 1.21 retrieving revision 1.22 diff -u -d -r1.21 -r1.22 --- xs.t 23 Jun 2005 10:50:43 -0000 1.21 +++ xs.t 28 Jun 2005 07:33:32 -0000 1.22 @@ -45,27 +45,27 @@ eval {$m->dispatch('clean')}; -ok not $@; +ok ! $@; eval {$m->dispatch('build')}; -ok not $@; +ok ! $@; { # Try again in a subprocess eval {$m->dispatch('clean')}; - ok not $@; + ok ! $@; $m->create_build_script; ok -e 'Build'; eval {$m->run_perl_script('Build')}; - ok not $@; + ok ! $@; } # We can't be verbose in the sub-test, because Test::Harness will # think that the output is for the top-level test. eval {$m->dispatch('test')}; -ok not $@; +ok ! $@; { $m->dispatch('ppd', args => {codebase => '/path/to/codebase-xs'}); @@ -99,22 +99,20 @@ unless $m->os_type eq 'Unix'; eval {$m->dispatch('clean')}; - ok not $@; + ok ! $@; local $m->{config}{ld} = "FOO=BAR $m->{config}{ld}"; eval {$m->dispatch('build')}; - ok not $@; + ok ! $@; } eval {$m->dispatch('realclean')}; -ok not $@; +ok ! $@; # Make sure blib/ is gone after 'realclean' -ok not -e 'blib'; +ok ! -e 'blib'; -######################### # cleanup - chdir( $cwd ) or die "Can''t chdir to '$cwd': $!"; $dist->remove; |
|
From: Randy W. S. <si...@us...> - 2005-06-28 07:31:32
|
Update of /cvsroot/module-build/Module-Build/t In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17934/t Modified Files: moduleinfo.t Log Message: Update to be more consistent with other test modules. Index: moduleinfo.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/moduleinfo.t,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- moduleinfo.t 23 Apr 2005 12:00:14 -0000 1.6 +++ moduleinfo.t 28 Jun 2005 07:31:23 -0000 1.7 @@ -1,22 +1,27 @@ +#!/usr/bin/perl -w +use lib 't/lib'; use strict; -use File::Spec; -BEGIN { - my $common_pl = File::Spec->catfile('t', 'common.pl'); - require $common_pl; -} +use Test::More tests => 33; -use Test::More; -BEGIN { - plan tests => 33; +use File::Spec (); +my $common_pl = File::Spec->catfile( 't', 'common.pl' ); +require $common_pl; - chdir( 't' ) if -d 't'; - push( @INC, 'lib' ); - require DistGen; -} +use Cwd (); +my $cwd = Cwd::cwd; + +use DistGen; +my $dist = DistGen->new; +$dist->regen; + +chdir( $dist->dirname ) or die "Can't chdir to '@{[$dist->dirname]}': $!"; + +######################### + use_ok( 'Module::Build::ModuleInfo' ); @@ -38,18 +43,14 @@ ok( !defined( $pm_info ), 'fail if can\'t find module by file name' ); -my $dist = DistGen->new; -$dist->regen; - # construct from module filename -$file = File::Spec->catfile( $dist->dirname, 'lib', 'Simple.pm' ); +$file = File::Spec->catfile( 'lib', split( /::/, $dist->name ) ) . '.pm'; $pm_info = Module::Build::ModuleInfo->new_from_file( $file ); ok( defined( $pm_info ), 'new_from_file() succeeds' ); # construct from module name, using custom include path -my $inc = File::Spec->catdir( qw( Simple lib ) ); $pm_info = Module::Build::ModuleInfo->new_from_module( - 'Simple', inc => [ $inc, @INC ] ); + $dist->name, inc => [ 'lib', @INC ] ); ok( defined( $pm_info ), 'new_from_module() succeeds' ); @@ -96,7 +97,6 @@ --- ); -$file = File::Spec->catfile( $dist->dirname, 'lib', 'Simple.pm' ); my( $i, $n ) = ( 1, scalar( @modules ) ); foreach my $module ( @modules ) { SKIP: { @@ -110,7 +110,13 @@ $i++; } } + +# revert to pristine state +chdir( $cwd ) or die "Can''t chdir to '$cwd': $!"; $dist->remove; +$dist = DistGen->new; +$dist->regen; +chdir( $dist->dirname ) or die "Can't chdir to '@{[$dist->dirname]}': $!"; # Find each package only once @@ -143,7 +149,13 @@ is( $pm_info->name, undef, 'no default package' ); is( $pm_info->version, undef, 'no version w/o default package' ); + +# revert to pristine state +chdir( $cwd ) or die "Can''t chdir to '$cwd': $!"; $dist->remove; +$dist = DistGen->new; +$dist->regen; +chdir( $dist->dirname ) or die "Can't chdir to '@{[$dist->dirname]}': $!"; # parse $VERSION lines scripts for package main @@ -190,8 +202,9 @@ foreach my $script ( @scripts ) { $dist->change_file( 'bin/simple.plx', $script ); $dist->regen; - $pm_info = - Module::Build::ModuleInfo->new_from_file( 'Simple/bin/simple.plx' ); + $pm_info = Module::Build::ModuleInfo->new_from_file( + File::Spec->catfile( 'bin', 'simple.plx' ) ); + is( $pm_info->version, '0.01', "correct script version ($i of $n)" ); $i++; } @@ -216,7 +229,7 @@ $dist->regen; $pm_info = Module::Build::ModuleInfo->new_from_module( - 'Simple', inc => [ $inc, @INC ] ); + $dist->name, inc => [ 'lib', @INC ] ); is( $pm_info->name, 'Simple', 'found default package' ); @@ -249,7 +262,7 @@ # collect_pod $pm_info = Module::Build::ModuleInfo->new_from_module( - 'Simple', inc => [ $inc, @INC ], collect_pod => 1 ); + $dist->name, inc => [ 'lib', @INC ], collect_pod => 1 ); my $name = $pm_info->pod('NAME'); if ( $name ) { @@ -259,4 +272,6 @@ is( $name, q|Simple - It's easy.|, 'collected pod section' ); +# cleanup +chdir( $cwd ) or die "Can''t chdir to '$cwd': $!"; $dist->remove; |
|
From: Randy W. S. <si...@us...> - 2005-06-28 07:25:28
|
Update of /cvsroot/module-build/Module-Build/t In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14601/t Modified Files: install.t Log Message: Use the DistGen module for tests. Index: install.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/install.t,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- install.t 13 Apr 2005 01:41:25 -0000 1.19 +++ install.t 28 Jun 2005 07:25:20 -0000 1.20 @@ -1,59 +1,80 @@ +#!/usr/bin/perl -w + +use lib 't/lib'; use strict; -use File::Spec; -BEGIN { - my $common_pl = File::Spec->catfile('t', 'common.pl'); - require $common_pl; -} -use Test::More (tests => 34); +use Test::More tests => 34; + + +use File::Spec (); +my $common_pl = File::Spec->catfile( 't', 'common.pl' ); +require $common_pl; + + +use Cwd (); +my $cwd = Cwd::cwd; + +use DistGen; +my $dist = DistGen->new; +$dist->regen; + +chdir( $dist->dirname ) or die "Can't chdir to '@{[$dist->dirname]}': $!"; + +######################### use Module::Build; -use File::Path; use Config; -my $start_dir = Module::Build->cwd; - -# Would be nice to just have a 'base_dir' parameter for M::B->new() -my $goto = File::Spec->catdir( $start_dir, 't', 'Sample' ); -chdir $goto or die "can't chdir to $goto: $!"; +$dist->add_file( 'script', <<'---' ); +#!perl -w +print "Hello, World!\n"; +--- +$dist->change_file( 'Build.PL', <<"---" ); +use Module::Build; +my \$build = new Module::Build( + module_name => @{[$dist->name]}, + scripts => [ 'script' ], + license => 'perl', + requires => { 'File::Spec' => 0 }, +); +\$build->create_build_script; +--- +$dist->regen; -my $build = new Module::Build( module_name => 'Sample', - script_files => [ 'script' ], - requires => { 'File::Spec' => 0 }, - license => 'perl' ); +my $build = Module::Build->new_from_context; ok $build; -my $destdir = File::Spec->catdir($start_dir, 't', 'install_test'); +my $destdir = File::Spec->catdir($cwd, 't', 'install_test'); $build->add_to_cleanup($destdir); { eval {$build->dispatch('install', destdir => $destdir)}; - is $@, ''; + ok ! $@; my $libdir = strip_volume( $build->install_destination('lib') ); - my $install_to = File::Spec->catfile($destdir, $libdir, 'Sample.pm'); + my $install_to = File::Spec->catfile($destdir, $libdir, $dist->name ) . '.pm'; print "Should have installed module as $install_to\n"; ok -e $install_to; local @INC = (@INC, File::Spec->catdir($destdir, $libdir)); - eval {require Sample}; - is $@, ''; + eval "require @{[$dist->name]}"; + ok ! $@; # Make sure there's a packlist installed my $archdir = $build->install_destination('arch'); my ($v, $d) = File::Spec->splitpath($archdir, 1); - my $packlist = File::Spec->catdir($destdir, $d, 'auto', 'Sample', '.packlist'); + my $packlist = File::Spec->catdir($destdir, $d, 'auto', $dist->name, '.packlist'); is -e $packlist, 1, "$packlist should be written"; } { eval {$build->dispatch('install', installdirs => 'core', destdir => $destdir)}; - is $@, ''; + ok ! $@; my $libdir = strip_volume( $Config{installprivlib} ); - my $install_to = File::Spec->catfile($destdir, $libdir, 'Sample.pm'); + my $install_to = File::Spec->catfile($destdir, $libdir, $dist->name ) . '.pm'; print "Should have installed module as $install_to\n"; ok -e $install_to; } @@ -62,7 +83,7 @@ my $libdir = File::Spec->catdir(File::Spec->rootdir, 'foo', 'bar'); eval {$build->dispatch('install', install_path => {lib => $libdir}, destdir => $destdir)}; is $@, ''; - my $install_to = File::Spec->catfile($destdir, $libdir, 'Sample.pm'); + my $install_to = File::Spec->catfile($destdir, $libdir, $dist->name ) . '.pm'; print "Should have installed module as $install_to\n"; ok -e $install_to; } @@ -71,9 +92,9 @@ my $libdir = File::Spec->catdir(File::Spec->rootdir, 'foo', 'base'); eval {$build->dispatch('install', install_base => $libdir, destdir => $destdir)}; is $@, ''; - my $install_to = File::Spec->catfile($destdir, $libdir, 'lib', 'perl5', 'Sample.pm'); + my $install_to = File::Spec->catfile($destdir, $libdir, 'lib', 'perl5', $dist->name ) . '.pm'; print "Should have installed module as $install_to\n"; - ok -e $install_to; + ok -e $install_to; } { @@ -87,32 +108,32 @@ my $libdir = strip_volume( $build->install_destination('lib') ); local @INC = (@INC, File::Spec->catdir($destdir, $libdir)); - eval {require Sample::ConfigData}; + eval "require @{[$dist->name]}::ConfigData"; is $build->feature('auto_foo'), 1; - SKIP: - { + SKIP: { skip $@, 5 if @_; # Make sure the values are present - is( Sample::ConfigData->config('foo'), 'bar' ); - ok( Sample::ConfigData->feature('baz') ); - ok( Sample::ConfigData->feature('auto_foo') ); - ok( not Sample::ConfigData->feature('nonexistent') ); + my $config = $dist->name . '::ConfigData'; + is( $config->config('foo'), 'bar' ); + ok( $config->feature('baz') ); + ok( $config->feature('auto_foo') ); + ok( not $config->feature('nonexistent') ); # Add a new value to the config set - Sample::ConfigData->set_config(floo => 'bhlar'); - is( Sample::ConfigData->config('floo'), 'bhlar' ); + $config->set_config(floo => 'bhlar'); + is( $config->config('floo'), 'bhlar' ); # Make sure it actually got written - Sample::ConfigData->write; - delete $INC{'Sample/ConfigData.pm'}; + $config->write; + delete $INC{"@{[$dist->name]}/ConfigData.pm"}; { local $^W; # Avoid warnings for subroutine redefinitions - require Sample::ConfigData; + eval "require $config"; } - is( Sample::ConfigData->config('floo'), 'bhlar' ); + is( $config->config('floo'), 'bhlar' ); } } @@ -128,7 +149,7 @@ eval {$build->run_perl_script('Build', [], ['install', '--destdir', $destdir])}; is $@, ''; - my $install_to = File::Spec->catfile($destdir, $libdir, 'Sample.pm'); + my $install_to = File::Spec->catfile($destdir, $libdir, $dist->name ) . '.pm'; print "# Should have installed module as $install_to\n"; ok -e $install_to; @@ -137,7 +158,7 @@ '--install_base', $basedir])}; is $@, ''; - $install_to = File::Spec->catfile($destdir, $libdir, 'Sample.pm'); + $install_to = File::Spec->catfile($destdir, $libdir, $dist->name ) . '.pm'; is -e $install_to, 1, "Look for file at $install_to"; eval {$build->dispatch('realclean')}; @@ -146,7 +167,7 @@ { # Make sure 'install_path' overrides 'install_base' - my $build = Module::Build->new( module_name => 'Sample', + my $build = Module::Build->new( module_name => $dist->name, install_base => File::Spec->catdir('', 'foo'), install_path => {lib => File::Spec->catdir('', 'bar')}); ok $build; @@ -154,11 +175,24 @@ } { + $dist->add_file( 'lib/Simple/Docs.pod', <<'---' ); +=head1 NAME + +Simple::Docs - Simple pod + +=head1 AUTHOR + +Simple Man <si...@ex...> + +=cut +--- + $dist->regen; + # _find_file_by_type() isn't a public method, but this is currently # the only easy way to test that it works properly. my $pods = $build->_find_file_by_type('pod', 'lib'); is keys %$pods, 1; - my $expect = $build->localize_file_path('lib/Sample/Docs.pod'); + my $expect = $build->localize_file_path('lib/Simple/Docs.pod'); is $pods->{$expect}, $expect; my $pms = $build->_find_file_by_type('awefawef', 'lib'); @@ -168,6 +202,13 @@ $pms = $build->_find_file_by_type('pod', 'awefawef'); ok $pms; is keys %$pms, 0; + + # revert to pristine state + chdir( $cwd ) or die "Can''t chdir to '$cwd': $!"; + $dist->remove; + $dist = DistGen->new; + $dist->regen; + chdir( $dist->dirname ) or die "Can't chdir to '@{[$dist->dirname]}': $!"; } sub strip_volume { @@ -176,3 +217,7 @@ return $dir; } + +# cleanup +chdir( $cwd ) or die "Can''t chdir to '$cwd': $!"; +$dist->remove; |
|
From: Randy W. S. <si...@us...> - 2005-06-28 06:28:04
|
Update of /cvsroot/module-build/Module-Build/t In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20918/t Modified Files: extend.t Log Message: Use the DistGen module for tests. Index: extend.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/extend.t,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- extend.t 21 Apr 2005 01:52:58 -0000 1.14 +++ extend.t 28 Jun 2005 06:27:52 -0000 1.15 @@ -1,36 +1,45 @@ -use strict; +#!/usr/bin/perl -w -# Tests various ways to extend Module::Build, e.g. by subclassing. -use File::Spec; -BEGIN { - my $common_pl = File::Spec->catfile('t', 'common.pl'); - require $common_pl; -} +use lib 't/lib'; +use strict; use Test::More tests => 52; -use Module::Build; -ok 1; -my $start_dir = Module::Build->cwd; -my $goto = File::Spec->catdir( $start_dir, 't', 'Sample' ); -chdir $goto or die "can't chdir to $goto: $!"; +use File::Spec (); +my $common_pl = File::Spec->catfile( 't', 'common.pl' ); +require $common_pl; + + +use Cwd (); +my $cwd = Cwd::cwd; + +use DistGen; +my $dist = DistGen->new; +$dist->regen; + +chdir( $dist->dirname ) or die "Can't chdir to '@{[$dist->dirname]}': $!"; + +######################### + +use Module::Build; +ok 1; # Here we make sure actions are only called once per dispatch() $::x = 0; -my $build = Module::Build->subclass +my $m = Module::Build->subclass ( code => "sub ACTION_loop { die 'recursed' if \$::x++; shift->depends_on('loop'); }" - )->new( module_name => 'Sample' ); -ok $build; + )->new( module_name => $dist->name ); +ok $m; -$build->dispatch('loop'); -is $::x, 1; +$m->dispatch('loop'); +ok $::x; -$build->dispatch('realclean'); +$m->dispatch('realclean'); # Make sure the subclass can be subclassed -my $build2class = ref($build)->subclass +my $build2class = ref($m)->subclass ( code => "sub ACTION_loop2 {}", class => 'MBB', @@ -39,35 +48,50 @@ can_ok( $build2class, 'ACTION_loop2' ); -{ - # Make sure globbing works in filenames - $build->test_files('*t*'); - my $files = $build->test_files; - ok grep {$_ eq 'script'} @$files; - ok grep {$_ eq 'test.pl'} @$files; - ok !grep {$_ eq 'Build.PL'} @$files; +{ # Make sure globbing works in filenames + $dist->add_file( 'script', <<'---' ); +#!perl -w +print "Hello, World!\n"; +--- + $dist->regen; + + $m->test_files('*t*'); + my $files = $m->test_files; + ok grep {$_ eq 'script'} @$files; + ok grep {$_ eq 't/basic.t'} @$files; + ok !grep {$_ eq 'Build.PL' } @$files; # Make sure order is preserved - $build->test_files('foo', 'bar'); - $files = $build->test_files; + $m->test_files('foo', 'bar'); + $files = $m->test_files; is @$files, 2; is $files->[0], 'foo'; is $files->[1], 'bar'; + + $dist->remove_file( 'script' ); + $dist->regen( clean => 1 ); } { # Make sure we can add new kinds of stuff to the build sequence - my $build = Module::Build->new( module_name => 'Sample', - foo_files => {'test.foo', 'lib/test.foo'} ); - ok $build; + $dist->add_file( 'test.foo', "content\n" ); + $dist->regen; - $build->add_build_element('foo'); - $build->dispatch('build'); - is -e File::Spec->catfile($build->blib, 'lib', 'test.foo'), 1; + my $m = Module::Build->new( module_name => $dist->name, + foo_files => {'test.foo', 'lib/test.foo'} ); + ok $m; - $build->dispatch('realclean'); + $m->add_build_element('foo'); + $m->dispatch('build'); + ok -e File::Spec->catfile($m->blib, 'lib', 'test.foo'); + + $m->dispatch('realclean'); + + # revert distribution to a pristine state + $dist->remove_file( 'test.foo' ); + $dist->regen( clean => 1 ); } @@ -103,37 +127,35 @@ } -chdir($start_dir) or die "Can't chdir back to $start_dir: $!"; -chdir('t') or die "Can't chdir to t/: $!"; { - ok my $build = MBSub->new( module_name => 'ModuleBuildOne' ); - isa_ok $build, 'Module::Build'; - isa_ok $build, 'MBSub'; - ok $build->valid_property('foo'); - can_ok $build, 'module_name'; + ok my $m = MBSub->new( module_name => $dist->name ); + isa_ok $m, 'Module::Build'; + isa_ok $m, 'MBSub'; + ok $m->valid_property('foo'); + can_ok $m, 'module_name'; # Check foo property. - can_ok $build, 'foo'; - ok ! $build->foo; - ok $build->foo(1); - ok $build->foo; + can_ok $m, 'foo'; + ok ! $m->foo; + ok $m->foo(1); + ok $m->foo; # Check bar property. - can_ok $build, 'bar'; - is $build->bar, 'hey'; - ok $build->bar('you'); - is $build->bar, 'you'; + can_ok $m, 'bar'; + is $m->bar, 'hey'; + ok $m->bar('you'); + is $m->bar, 'you'; # Check hash property. - ok $build = MBSub->new( - module_name => 'ModuleBuildOne', - hash => { foo => 'bar', bin => 'foo'} - ); + ok $m = MBSub->new( + module_name => $dist->name, + hash => { foo => 'bar', bin => 'foo'} + ); - can_ok $build, 'hash'; - isa_ok $build->hash, 'HASH'; - is $build->hash->{foo}, 'bar'; - is $build->hash->{bin}, 'foo'; + can_ok $m, 'hash'; + isa_ok $m->hash, 'HASH'; + is $m->hash->{foo}, 'bar'; + is $m->hash->{bin}, 'foo'; # Check hash property passed via the command-line. { @@ -141,47 +163,51 @@ '--hash', 'foo=bar', '--hash', 'bin=foo', ); - ok $build = MBSub->new( - module_name => 'ModuleBuildOne', - ); + ok $m = MBSub->new( + module_name => $dist->name, + ); } - can_ok $build, 'hash'; - isa_ok $build->hash, 'HASH'; - is $build->hash->{foo}, 'bar'; - is $build->hash->{bin}, 'foo'; + can_ok $m, 'hash'; + isa_ok $m->hash, 'HASH'; + is $m->hash->{foo}, 'bar'; + is $m->hash->{bin}, 'foo'; # Make sure that a different subclass with the same named property has a # different default. - ok $build = MBSub2->new( module_name => 'ModuleBuildOne' ); - isa_ok $build, 'Module::Build'; - isa_ok $build, 'MBSub2'; - ok $build->valid_property('bar'); - can_ok $build, 'bar'; - is $build->bar, 'yow'; + ok $m = MBSub2->new( module_name => $dist->name ); + isa_ok $m, 'Module::Build'; + isa_ok $m, 'MBSub2'; + ok $m->valid_property('bar'); + can_ok $m, 'bar'; + is $m->bar, 'yow'; } { # Test the meta_add and meta_merge stuff - chdir $goto; - ok my $build = Module::Build->new( - module_name => 'Sample', - meta_add => {foo => 'bar'}, - conflicts => {'Foo::Barxx' => 0}, - ); + ok my $m = Module::Build->new( + module_name => $dist->name, + meta_add => {foo => 'bar'}, + conflicts => {'Foo::Barxx' => 0}, + ); my %data; - $build->prepare_metadata( \%data ); + $m->prepare_metadata( \%data ); is $data{foo}, 'bar'; - $build->meta_merge(foo => 'baz'); - $build->prepare_metadata( \%data ); + $m->meta_merge(foo => 'baz'); + $m->prepare_metadata( \%data ); is $data{foo}, 'baz'; - $build->meta_merge(conflicts => {'Foo::Fooxx' => 0}); - $build->prepare_metadata( \%data ); + $m->meta_merge(conflicts => {'Foo::Fooxx' => 0}); + $m->prepare_metadata( \%data ); is_deeply $data{conflicts}, {'Foo::Barxx' => 0, 'Foo::Fooxx' => 0}; - $build->meta_add(conflicts => {'Foo::Bazxx' => 0}); - $build->prepare_metadata( \%data ); + $m->meta_add(conflicts => {'Foo::Bazxx' => 0}); + $m->prepare_metadata( \%data ); is_deeply $data{conflicts}, {'Foo::Bazxx' => 0, 'Foo::Fooxx' => 0}; } + + +# cleanup +chdir( $cwd ) or die "Can''t chdir to '$cwd': $!"; +$dist->remove; |
|
From: Randy W. S. <si...@us...> - 2005-06-28 06:26:44
|
Update of /cvsroot/module-build/Module-Build/t/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20446/t/lib Modified Files: DistGen.pm Log Message: Add 'MANIFEST' to the distribution filedata. When cleaning up, unlink only files that actually exists. Index: DistGen.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/lib/DistGen.pm,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- DistGen.pm 28 Jun 2005 05:01:30 -0000 1.6 +++ DistGen.pm 28 Jun 2005 06:26:32 -0000 1.7 @@ -158,11 +158,14 @@ $self->remove(); die "Can't write '$manifest'\n"; }; - print $fh "MANIFEST\n"; - print $fh join( "\n", sort keys( %{$self->{filedata}} ) ); - print $fh "\n"; + + my @files = ( 'MANIFEST', keys %{$self->{filedata}} ); + my $data = join( "\n", sort @files ) . "\n"; + print $fh $data; close( $fh ); + $self->{filedata}{MANIFEST} = $data; + $self->{pending}{change}{MANIFEST} = 1; } sub name { shift()->{name} } @@ -195,7 +198,9 @@ foreach my $file ( @files ) { my $real_filename = $self->_real_filename( $file ); my $fullname = File::Spec->catfile( $dist_dirname, $real_filename ); - unlink( $fullname ) or die "Couldn't unlink '$file'\n"; + if ( -e $fullname ) { + unlink( $fullname ) || die "Couldn't unlink '$file'\n"; + } print "Unlinking pending file '$file'\n" if $VERBOSE; delete( $self->{pending}{remove}{$file} ); } |
|
From: Randy W. S. <si...@us...> - 2005-06-28 05:31:11
|
Update of /cvsroot/module-build/Module-Build/t In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25200/t Modified Files: ext.t Log Message: Rearrange init code for consistency. Index: ext.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/ext.t,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- ext.t 23 Mar 2005 01:30:54 -0000 1.15 +++ ext.t 28 Jun 2005 05:31:03 -0000 1.16 @@ -1,15 +1,16 @@ +#!/usr/bin/perl -w +use lib 't/lib'; use strict; -use File::Spec; -BEGIN { - my $t_lib = File::Spec->catdir('t', 'lib'); - push @INC, $t_lib; # Let user's installed version override -} +use File::Spec (); +my $common_pl = File::Spec->catfile( 't', 'common.pl' ); +require $common_pl; + +######################### + use Test::More; -my $common_pl = File::Spec->catfile('t', 'common.pl'); -require $common_pl; my @unix_splits = ( @@ -62,6 +63,8 @@ plan tests => 10 + 2*@unix_splits + 2*@win_splits; +######################### + use Module::Build; ok(1); |
|
From: Randy W. S. <si...@us...> - 2005-06-28 05:25:57
|
Update of /cvsroot/module-build/Module-Build/t In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22044/t Modified Files: runthrough.t Log Message: More Test => Test::More conversions. Index: runthrough.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/runthrough.t,v retrieving revision 1.52 retrieving revision 1.53 diff -u -d -r1.52 -r1.53 --- runthrough.t 28 Jun 2005 05:10:32 -0000 1.52 +++ runthrough.t 28 Jun 2005 05:25:49 -0000 1.53 @@ -69,7 +69,9 @@ print $output; print "^^^^^^^^^^^^^^^^^^^^^ Sample/test.pl output ^^^^^^^^^^^^^^^^^^^^^\n"; -if ($have_yaml) { +SKIP: { + skip( 'YAML_support feature is not enabled', 7 ) unless $have_yaml; + eval {$build->dispatch('disttest')}; ok ! $@; @@ -90,20 +92,18 @@ my $fh = IO::File->new(File::Spec->catfile($goto, 'META.yml')); my $contents = do {local $/; <$fh>}; $contents =~ /Module::Build version ([0-9_.]+)/m; - ok $1 == $build->VERSION, "Check version used to create META.yml: $1 == " . $build->VERSION; - - if ($build->check_installed_status('Archive::Tar', 0) - or $build->isa('Module::Build::Platform::Unix')) { + is $1, $build->VERSION, "Check version used to create META.yml: $1 == " . $build->VERSION; + + SKIP: { + skip( "not sure if we can create a tarball on this platform", 1 ) + unless $build->check_installed_status('Archive::Tar', 0) || + $build->isa('Module::Build::Platform::Unix'); + $build->add_to_cleanup($build->dist_dir . ".tar.gz"); eval {$build->dispatch('dist')}; ok ! $@; - - } else { - skip_subtest("not sure if we can create a tarball on this platform"); } -} else { - skip_subtest("YAML_support feature is not enabled") for 1..7; } { |
|
From: Randy W. S. <si...@us...> - 2005-06-28 05:10:41
|
Update of /cvsroot/module-build/Module-Build/t In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12610/t Modified Files: runthrough.t Log Message: use Test::More Index: runthrough.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/runthrough.t,v retrieving revision 1.51 retrieving revision 1.52 diff -u -d -r1.51 -r1.52 --- runthrough.t 7 Jan 2005 10:15:54 -0000 1.51 +++ runthrough.t 28 Jun 2005 05:10:32 -0000 1.52 @@ -1,19 +1,27 @@ +#!/usr/bin/perl -w + +use lib 't/lib'; use strict; -use Test; -BEGIN { plan tests => 28 } -use Module::Build; -use File::Spec; -use File::Path; -use Config; +use Test::More tests => 28; -ok(1); -ok $INC{'Module/Build.pm'}, '/blib/', "Make sure version from blib/ is loaded"; -my $common_pl = File::Spec->catfile('t', 'common.pl'); +use File::Spec (); +my $common_pl = File::Spec->catfile( 't', 'common.pl' ); require $common_pl; -######################### End of black magic. + +use Cwd (); +my $cwd = Cwd::cwd; + +######################### + +use Module::Build; +ok(1); + +like $INC{'Module/Build.pm'}, qr{/blib/}, "Make sure version from blib/ is loaded"; + +######################### my $have_yaml = Module::Build->current->feature('YAML_support'); @@ -25,31 +33,31 @@ my $build = Module::Build->new_from_context(); ok $build; -ok $build->license, 'perl'; +is $build->license, 'perl'; # Make sure cleanup files added before create_build_script() get respected $build->add_to_cleanup('before_script'); eval {$build->create_build_script}; -ok $@, ''; -ok -e $build->build_script, 1; +ok ! $@; +ok -e $build->build_script; -ok $build->dist_dir, 'Sample-0.01'; +is $build->dist_dir, 'Sample-0.01'; # The 'cleanup' file doesn't exist yet -ok grep $_ eq 'before_script', $build->cleanup; +ok grep {$_ eq 'before_script'} $build->cleanup; $build->add_to_cleanup('save_out'); # The 'cleanup' file now exists -ok grep $_ eq 'before_script', $build->cleanup; -ok grep $_ eq 'save_out', $build->cleanup; +ok grep {$_ eq 'before_script'} $build->cleanup; +ok grep {$_ eq 'save_out' } $build->cleanup; my $output = eval { stdout_of( sub { $build->dispatch('test', verbose => 1) } ) }; -ok $@, ''; -ok $output, qr/all tests successful/i; +ok ! $@; +like $output, qr/all tests successful/i; # This is the output of lib/Sample/Script.PL ok -e $build->localize_file_path('lib/Sample/Script'); @@ -63,32 +71,32 @@ if ($have_yaml) { eval {$build->dispatch('disttest')}; - ok $@, ''; + ok ! $@; # After a test, the distdir should contain a blib/ directory ok -e File::Spec->catdir('Sample-0.01', 'blib'); eval {$build->dispatch('distdir')}; - ok $@, ''; + ok ! $@; # The 'distdir' should contain a lib/ directory ok -e File::Spec->catdir('Sample-0.01', 'lib'); # The freshly run 'distdir' should never contain a blib/ directory, or # else it could get into the tarball - ok not -e File::Spec->catdir('Sample-0.01', 'blib'); + ok ! -e File::Spec->catdir('Sample-0.01', 'blib'); # Make sure all of the above was done by the new version of Module::Build my $fh = IO::File->new(File::Spec->catfile($goto, 'META.yml')); my $contents = do {local $/; <$fh>}; $contents =~ /Module::Build version ([0-9_.]+)/m; - ok $1 == $build->VERSION, 1, "Check version used to create META.yml: $1 == " . $build->VERSION; + ok $1 == $build->VERSION, "Check version used to create META.yml: $1 == " . $build->VERSION; if ($build->check_installed_status('Archive::Tar', 0) or $build->isa('Module::Build::Platform::Unix')) { $build->add_to_cleanup($build->dist_dir . ".tar.gz"); eval {$build->dispatch('dist')}; - ok $@, ''; + ok ! $@; } else { skip_subtest("not sure if we can create a tarball on this platform"); @@ -105,13 +113,13 @@ # Check that a shebang line is rewritten my $blib_script = File::Spec->catdir( qw( blib script script ) ); - ok -e $blib_script; + ok -e $blib_script; my $fh = IO::File->new($blib_script); my $first_line = <$fh>; print "# rewritten shebang?\n$first_line"; - ok $first_line ne "#!perl -w\n"; + isnt $first_line, "#!perl -w\n"; } { @@ -123,7 +131,7 @@ # This test is quite a hack since with XML you don't really want to # do a strict string comparison, but absent an XML parser it's the # best we can do. - ok $ppd, <<'EOF'; + is $ppd, <<'EOF'; <SOFTPKG NAME="Sample" VERSION="0,01,0,0"> <TITLE>Sample</TITLE> <ABSTRACT>Foo foo sample foo</ABSTRACT> @@ -138,8 +146,8 @@ eval {$build->dispatch('realclean')}; -ok $@, ''; +ok ! $@; -ok not -e $build->build_script; -ok not -e $build->config_dir; -ok not -e $build->dist_dir; +ok ! -e $build->build_script; +ok ! -e $build->config_dir; +ok ! -e $build->dist_dir; |
|
From: Randy W. S. <si...@us...> - 2005-06-28 05:02:45
|
Update of /cvsroot/module-build/Module-Build/t In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8739/t Modified Files: signature.t Log Message: Use the DistGen module for tests. Index: signature.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/signature.t,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- signature.t 28 Jun 2005 04:27:16 -0000 1.9 +++ signature.t 28 Jun 2005 05:02:26 -0000 1.10 @@ -23,32 +23,41 @@ ######################### - use Cwd (); my $cwd = Cwd::cwd; - +use DistGen; +my $dist = DistGen->new; +$dist->change_file( 'Build.PL', <<"---" ); use Module::Build; -my $base_dir = File::Spec->catdir( $cwd, 't', 'Sample' ); -chdir $base_dir or die "can't chdir to $base_dir: $!"; +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 $build = Module::Build->new_from_context; -my $build = Module::Build->new( module_name => 'Sample', - requires => { 'File::Spec' => 0 }, - license => 'perl', - sign => 1, - ); { eval {$build->dispatch('distdir')}; ok ! $@; - chdir $build->dist_dir or die "Can't chdir to ", $build->dist_dir, ": $!"; + chdir( $build->dist_dir ) or die "Can't chdir to '@{[$build->dist_dir]}': $!"; ok -e 'SIGNATURE'; # Make sure the signature actually verifies ok Module::Signature::verify() == Module::Signature::SIGNATURE_OK(); - chdir $base_dir or die "can't chdir back to $base_dir: $!"; + chdir( $dist->dirname ) or die "Can't chdir to '@{[$dist->dirname]}': $!"; } { @@ -68,3 +77,8 @@ eval { $build->dispatch('realclean') }; ok ! $@; + + +# cleanup +chdir( $cwd ) or die "Can''t chdir to '$cwd': $!"; +$dist->remove; |
|
From: Randy W. S. <si...@us...> - 2005-06-28 05:01:38
|
Update of /cvsroot/module-build/Module-Build/t/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8423/t/lib Modified Files: DistGen.pm Log Message: Add 'MANIFEST' to 'MANIFEST'. Index: DistGen.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/lib/DistGen.pm,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- DistGen.pm 23 Jun 2005 10:39:45 -0000 1.5 +++ DistGen.pm 28 Jun 2005 05:01:30 -0000 1.6 @@ -158,6 +158,7 @@ $self->remove(); die "Can't write '$manifest'\n"; }; + print $fh "MANIFEST\n"; print $fh join( "\n", sort keys( %{$self->{filedata}} ) ); print $fh "\n"; close( $fh ); |
|
From: Randy W. S. <si...@us...> - 2005-06-28 04:27:27
|
Update of /cvsroot/module-build/Module-Build/t In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23270/t Modified Files: signature.t Log Message: use Test::More Index: signature.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/signature.t,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- signature.t 7 Jan 2005 10:15:54 -0000 1.8 +++ signature.t 28 Jun 2005 04:27:16 -0000 1.9 @@ -1,30 +1,48 @@ -#!perl -w +#!/usr/bin/perl -w + +use lib 't/lib'; use strict; -use Test; -use File::Spec; -my $common_pl = File::Spec->catfile('t', 'common.pl'); +use File::Spec (); +my $common_pl = File::Spec->catfile( 't', 'common.pl' ); require $common_pl; -use Module::Build; -skip_test("Skipping unless \$ENV{TEST_SIGNATURE} is true") unless $ENV{TEST_SIGNATURE}; -need_module('Module::Signature'); -plan tests => 7; +######################### +use Test::More; -my $base_dir = File::Spec->catdir( Module::Build->cwd, 't', 'Sample' ); +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; + + +use Module::Build; + +my $base_dir = File::Spec->catdir( $cwd, 't', 'Sample' ); chdir $base_dir or die "can't chdir to $base_dir: $!"; -my $build = new Module::Build( module_name => 'Sample', - requires => { 'File::Spec' => 0 }, - license => 'perl', - sign => 1, - ); +my $build = Module::Build->new( module_name => 'Sample', + requires => { 'File::Spec' => 0 }, + license => 'perl', + sign => 1, + ); { eval {$build->dispatch('distdir')}; - ok $@, ''; + ok ! $@; chdir $build->dist_dir or die "Can't chdir to ", $build->dist_dir, ": $!"; ok -e 'SIGNATURE'; @@ -43,10 +61,10 @@ local *Module::Build::Base::ACTION_distmeta = sub { push @run_order, 'distmeta' }; eval { $build->dispatch('distdir') }; } - ok $@, ''; - ok $run_order[0], 'distmeta'; - ok $run_order[1], 'sign'; + ok ! $@; + is $run_order[0], 'distmeta'; + is $run_order[1], 'sign'; } eval { $build->dispatch('realclean') }; -ok $@, ''; +ok ! $@; |
|
From: Randy W. S. <si...@us...> - 2005-06-28 04:03:07
|
Update of /cvsroot/module-build/Module-Build/t In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11485/t Modified Files: versions.t Log Message: use Test::More Index: versions.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/versions.t,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- versions.t 28 Jun 2005 03:58:40 -0000 1.4 +++ versions.t 28 Jun 2005 04:02:44 -0000 1.5 @@ -5,15 +5,17 @@ use Test::More tests => 2; -use Cwd (); -my $cwd = Cwd::cwd; +use DistGen; +my $dist = DistGen->new; +$dist->regen; ######################### use Module::Build; use File::Spec; -my $file = File::Spec->catfile('t', 'Sample', 'lib', 'Sample.pm'); +my @mod = split( /::/, $dist->name ); +my $file = File::Spec->catfile( $dist->dirname, 'lib', @mod ) . '.pm'; is( Module::Build->version_from_file( $file ), '0.01', 'version_from_file' ); ok( Module::Build->compare_versions( '1.01_01', '>', '1.01' ), 'compare: 1.0_01 > 1.0' ); |
|
From: Randy W. S. <si...@us...> - 2005-06-28 03:58:51
|
Update of /cvsroot/module-build/Module-Build/t In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9418/t Modified Files: versions.t Log Message: use Test::More Index: versions.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/versions.t,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- versions.t 1 Aug 2003 03:28:13 -0000 1.3 +++ versions.t 28 Jun 2005 03:58:40 -0000 1.4 @@ -1,13 +1,19 @@ -#!/usr/bin/perl +#!/usr/bin/perl -w +use lib 't/lib'; use strict; -use Test; -BEGIN { plan tests => 2 } + +use Test::More tests => 2; + +use Cwd (); +my $cwd = Cwd::cwd; + +######################### use Module::Build; use File::Spec; my $file = File::Spec->catfile('t', 'Sample', 'lib', 'Sample.pm'); -ok( Module::Build->version_from_file( $file ), '0.01', 'version_from_file' ); +is( Module::Build->version_from_file( $file ), '0.01', 'version_from_file' ); -ok( Module::Build->compare_versions( '1.01_01', '>', '1.01' ), 1, 'compare: 1.0_01 > 1.0' ); +ok( Module::Build->compare_versions( '1.01_01', '>', '1.01' ), 'compare: 1.0_01 > 1.0' ); |
|
From: Randy W. S. <si...@us...> - 2005-06-28 03:55:28
|
Update of /cvsroot/module-build/Module-Build/t In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7465/t Modified Files: pod_parser.t Log Message: use Test::More Index: pod_parser.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/pod_parser.t,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- pod_parser.t 9 Oct 2004 15:39:01 -0000 1.2 +++ pod_parser.t 28 Jun 2005 03:55:19 -0000 1.3 @@ -1,10 +1,22 @@ +#!/usr/bin/perl -w +use lib 't/lib'; use strict; -use Test; -plan tests => 4; -use Module::Build::PodParser; -ok(1); +use Test::More tests => 4; + + +use File::Spec (); +my $common_pl = File::Spec->catfile( 't', 'common.pl' ); +require $common_pl; + + +use Cwd (); +my $cwd = Cwd::cwd; + +######################### + +use_ok 'Module::Build::PodParser'; { package IO::StringBased; @@ -38,7 +50,7 @@ my $pp = Module::Build::PodParser->new(fh => \*FH); -ok $pp; +ok $pp, 'object created'; -ok $pp->get_author->[0], 'C<Foo::Bar> was written by Engelbert Humperdinck I<E<lt>eh...@ex...<gt>> in 2004.'; -ok $pp->get_abstract, 'Perl extension for blah blah blah'; +is $pp->get_author->[0], 'C<Foo::Bar> was written by Engelbert Humperdinck I<E<lt>eh...@ex...<gt>> in 2004.', 'author'; +is $pp->get_abstract, 'Perl extension for blah blah blah', 'abstract'; |
|
From: Randy W. S. <si...@us...> - 2005-06-28 03:51:48
|
Update of /cvsroot/module-build/Module-Build/t In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6041/t Modified Files: parents.t Log Message: use Test::More Index: parents.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/parents.t,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- parents.t 15 Dec 2004 21:32:48 -0000 1.1 +++ parents.t 28 Jun 2005 03:51:40 -0000 1.2 @@ -1,6 +1,13 @@ +#!/usr/bin/perl -w + +use lib 't/lib'; use strict; -use Test; -BEGIN { plan tests => 27 } + +use Test::More tests => 27; + + +######################### + use Module::Build; ok(1); @@ -29,29 +36,29 @@ ok @parents >= 2; # They should all inherit from Module::Build::Base; ok ! grep { !$_->isa('Module::Build::Base') } @parents; -ok $parents[0], 'Module::Build'; -ok $parents[-1], 'Module::Build::Base'; +is $parents[0], 'Module::Build'; +is $parents[-1], 'Module::Build::Base'; ok @parents = MySub2->mb_parents; ok @parents >= 3; ok ! grep { !$_->isa('Module::Build::Base') } @parents; -ok $parents[0], 'MySub1'; -ok $parents[1], 'Module::Build'; -ok $parents[-1], 'Module::Build::Base'; +is $parents[0], 'MySub1'; +is $parents[1], 'Module::Build'; +is $parents[-1], 'Module::Build::Base'; ok @parents = MySub3->mb_parents; ok @parents >= 4; ok ! grep { !$_->isa('Module::Build::Base') } @parents; -ok $parents[0], 'MySub2'; -ok $parents[1], 'MySub1'; -ok $parents[2], 'Module::Build'; -ok $parents[-1], 'Module::Build::Base'; +is $parents[0], 'MySub2'; +is $parents[1], 'MySub1'; +is $parents[2], 'Module::Build'; +is $parents[-1], 'Module::Build::Base'; ok @parents = MyBulk->mb_parents; ok @parents >= 5; ok ! grep { !$_->isa('Module::Build::Base') } @parents; -ok $parents[0], 'MySub2'; -ok $parents[1], 'MySub1'; -ok $parents[2], 'Module::Build'; -ok $parents[-2], 'Module::Build::Base'; -ok $parents[-1], 'MyTest'; +is $parents[0], 'MySub2'; +is $parents[1], 'MySub1'; +is $parents[2], 'Module::Build'; +is $parents[-2], 'Module::Build::Base'; +is $parents[-1], 'MyTest'; |
|
From: Randy W. S. <si...@us...> - 2005-06-28 03:47:43
|
Update of /cvsroot/module-build/Module-Build/t In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4070/t Modified Files: manifypods.t Log Message: use Test::More Index: manifypods.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/manifypods.t,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- manifypods.t 27 Feb 2005 14:19:30 -0000 1.10 +++ manifypods.t 28 Jun 2005 03:47:33 -0000 1.11 @@ -1,22 +1,31 @@ #!/usr/bin/perl -w +use lib 't/lib'; use strict; -use File::Spec; -use File::Path qw( rmtree ); -use Test; -use Module::Build; +use File::Spec (); +my $common_pl = File::Spec->catfile( 't', 'common.pl' ); +require $common_pl; -BEGIN { - my $common_pl = File::Spec->catfile('t', 'common.pl'); - require $common_pl; - skip_test("manpage_support feature is not enabled") - unless Module::Build->current->feature('manpage_support'); +use Cwd (); +my $cwd = Cwd::cwd; + +######################### + +use Test::More; + +use Module::Build; +if ( Module::Build->current->feature('manpage_support') ) { plan tests => 21; +} else { + plan skip_all => 'manpage_support feature is not enabled'; } -my $start = Module::Build->cwd; -my $install = File::Spec->catdir( $start, 't', '_tmp' ); +######################### + +use File::Path qw( rmtree ); + +my $install = File::Spec->catdir( $cwd, 't', '_tmp' ); chdir File::Spec->catdir( 't','Sample' ) or die "Can't chdir to t/Sample: $!"; my $m = new Module::Build @@ -26,8 +35,8 @@ scripts => [ 'script', File::Spec->catfile( 'bin', 'sample.pl' ) ], ); -ok( ref $m->{properties}->{bindoc_dirs}, 'ARRAY', 'bindoc_dirs' ); -ok( ref $m->{properties}->{libdoc_dirs}, 'ARRAY', 'libdoc_dirs' ); +is( ref $m->{properties}->{bindoc_dirs}, 'ARRAY', 'bindoc_dirs' ); +is( ref $m->{properties}->{libdoc_dirs}, 'ARRAY', 'libdoc_dirs' ); my %man = ( sep => $m->manpage_separator, @@ -50,17 +59,17 @@ $m->dispatch('build'); eval {$m->dispatch('docs')}; -ok $@, ''; +ok ! $@; while (my ($from, $v) = each %distro) { if (!$v) { - ok $m->contains_pod($from), '', "$from should not contain POD"; + ok ! $m->contains_pod($from), "$from should not contain POD"; next; } my $to = File::Spec->catfile('blib', ($from =~ /^lib/ ? 'libdoc' : 'bindoc'), $v); - ok $m->contains_pod($from), 1, "$from should contain POD"; - ok -e $to, 1, "Created $to manpage"; + ok $m->contains_pod($from), "$from should contain POD"; + ok -e $to, "Created $to manpage"; } @@ -70,7 +79,7 @@ while (my ($from, $v) = each %distro) { next unless $v; my $to = File::Spec->catfile($install, 'man', $man{($from =~ /^lib/ ? 'dir3' : 'dir1')}, $v); - ok -e $to, 1, "Created $to manpage"; + ok -e $to, "Created $to manpage"; } $m->dispatch('realclean'); @@ -82,7 +91,7 @@ libdoc_dirs => [qw( foo bar baz )], ); -ok( $m2->{properties}->{libdoc_dirs}->[0], 'foo', 'override libdoc_dirs' ); +is( $m2->{properties}->{libdoc_dirs}->[0], 'foo', 'override libdoc_dirs' ); # Make sure we can find our own action documentation ok $m2->get_action_docs('build'); @@ -91,6 +100,6 @@ # Make sure those docs are the correct ones foreach ('ppd', 'disttest') { my $docs = $m2->get_action_docs($_); - ok $docs, "/=item $_/"; - ok $docs !~ /\n=/, 1, $docs; + like $docs, qr/=item $_/; + unlike $docs, qr/\n=/, $docs; } |
|
From: Randy W. S. <si...@us...> - 2005-06-28 03:36:54
|
Update of /cvsroot/module-build/Module-Build/t In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30511/t Modified Files: compat.t Log Message: Use the DistGen module for tests. Index: compat.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/compat.t,v retrieving revision 1.26 retrieving revision 1.27 diff -u -d -r1.26 -r1.27 --- compat.t 28 Jun 2005 02:55:43 -0000 1.26 +++ compat.t 28 Jun 2005 03:36:45 -0000 1.27 @@ -3,27 +3,15 @@ use lib 't/lib'; use strict; -use Test::More; - - use File::Spec (); my $common_pl = File::Spec->catfile( 't', 'common.pl' ); require $common_pl; -use Cwd (); -my $cwd = Cwd::cwd; - -use Module::Build; -use Module::Build::Compat; - -use File::Path; -use Config; - -use Carp; $SIG{__WARN__} = \&Carp::cluck; - ######################### +use Config; +use Test::More; # Don't let our own verbosity/test_file get mixed up with our subprocess's my @makefile_keys = qw(TEST_VERBOSE HARNESS_VERBOSE TEST_FILES MAKEFLAGS); @@ -39,13 +27,30 @@ } ok(1); # Loaded + +######################### + +use Cwd (); +my $cwd = Cwd::cwd; + +use DistGen; +my $dist = DistGen->new; +$dist->regen; + +chdir( $dist->dirname ) or die "Can't chdir to '@{[$dist->dirname]}': $!"; + + ######################### +use Module::Build; +use Module::Build::Compat; + +use Carp; $SIG{__WARN__} = \&Carp::cluck; my @make = $Config{make} eq 'nmake' ? ('nmake', '-nologo') : ($Config{make}); -my $goto = File::Spec->catdir( $cwd, 't', 'Sample' ); -chdir $goto or die "can't chdir to $goto: $!"; +######################### + my $build = Module::Build->new_from_context; ok $build; @@ -139,14 +144,15 @@ $output = stdout_of( sub { $ran_ok = $new_build->do_system(@make, 'test') } ); ok $ran_ok; $output =~ s/^/# /gm; # Don't confuse our own test output - like $output, qr/# ok 1\s+# ok 2\s+/, 'Should be verbose'; + like $output, qr/(?:# ok \d+\s+)+/, 'Should be verbose'; # Make sure various Makefile arguments are supported $output = stdout_of( sub { $ran_ok = $build->do_system(@make, 'test', 'TEST_VERBOSE=0') } ); ok $ran_ok; $output =~ s/^/# /gm; # Don't confuse our own test output - like $output, qr/# test\.+ok\s+(?:[\d.]s\s*)?# All tests/, 'Should be non-verbose'; - + like $output, qr/(?:# t[\/\w]+\.+ok\s+(?:[\d.]s\s*)?)+# All tests/, + 'Should be non-verbose'; + $build->delete_filetree($libdir); ok ! -e $libdir, "Sample installation directory should be cleaned up"; |