[Module-build-checkins] Module-Build/t destinations.t,1.22,1.23 manifypods.t,1.14,1.15
Status: Beta
Brought to you by:
kwilliams
|
From: Randy W. S. <si...@us...> - 2005-07-28 03:07:17
|
Update of /cvsroot/module-build/Module-Build/t In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1076/t Modified Files: destinations.t manifypods.t Log Message: First shot at a fix for prefixification to allow for platforms that may not define libdoc, bindoc, & html directories. Also, add properties to turn on or off generation and installation of html and manpages. Note that tests are incomplete & htmldir should be split into html1dir & html3dir. Index: manifypods.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/manifypods.t,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- manifypods.t 29 Jun 2005 08:27:06 -0000 1.14 +++ manifypods.t 28 Jul 2005 03:07:01 -0000 1.15 @@ -69,8 +69,9 @@ my $mb = Module::Build->new( - install_base => $destdir, - module_name => $dist->name, + module_name => $dist->name, + install_base => $destdir, + gen_manpages => 1, # some platforms don't by default scripts => [ File::Spec->catfile( 'bin', 'nopod.pl' ), File::Spec->catfile( 'bin', 'haspod.pl' ) ], ); Index: destinations.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/destinations.t,v retrieving revision 1.22 retrieving revision 1.23 diff -u -d -r1.22 -r1.23 --- destinations.t 29 Jun 2005 08:27:06 -0000 1.22 +++ destinations.t 28 Jul 2005 03:07:01 -0000 1.23 @@ -3,7 +3,7 @@ use lib 't/lib'; use strict; -use Test::More tests => 68; +use Test::More 'no_plan'; # tests => 68; use File::Spec (); @@ -58,7 +58,8 @@ script => $Config{installsitescript} || $Config{installsitebin} || $Config{installscript}, bindoc => $Config{installsiteman1dir} || $Config{installman1dir}, - libdoc => $Config{installsiteman3dir} || $Config{installman3dir} + libdoc => $Config{installsiteman3dir} || $Config{installman3dir}, + html => $Config{installsitehtmldir} || $Config{installhtmldir} }); } @@ -75,6 +76,7 @@ script => $Config{installscript} || $Config{installbin}, bindoc => $Config{installman1dir}, libdoc => $Config{installman3dir}, + html => $Config{installhtmldir}, }); $mb->installdirs('site'); @@ -98,6 +100,7 @@ script => catdir( $install_base, 'bin' ), bindoc => catdir( $install_base, 'man', 'man1'), libdoc => catdir( $install_base, 'man', 'man3' ), + html => catdir( $install_base, 'html' ), }); } @@ -175,25 +178,21 @@ script => catdir( $install_base, 'bin' ), bindoc => catdir( $install_base, 'man', 'man1'), libdoc => catdir( $install_base, 'man', 'man3' ), + html => catdir( $install_base, 'html'), }); } -TODO: { - local $TODO = "install paths not defined."; - ok 0, '(bin|lib)doc install destination'; -} - sub test_prefix { my ($prefix, $test_config) = @_; - + local $Test::Builder::Level = $Test::Builder::Level + 1; - foreach my $type (qw(lib arch bin script bindoc libdoc)) { + foreach my $type (qw(lib arch bin script bindoc libdoc html)) { my $dest = $mb->install_destination( $type ); like( $dest, "/^\Q$prefix\E/", "$type prefixed"); - if( $test_config ) { + if( $test_config && $test_config->{$type} ) { my @test_dirs = splitdir( $test_config->{$type} ); my @dest_dirs = splitdir( $dest ); |