Update of /cvsroot/module-build/Module-Build/t
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3831/t
Modified Files:
common.pl ppm.t
Log Message:
Add tests to ensure that html documents are built in the ppm distro when they are not built during a normal build.
Index: ppm.t
===================================================================
RCS file: /cvsroot/module-build/Module-Build/t/ppm.t,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- ppm.t 21 Nov 2005 06:24:58 -0000 1.1
+++ ppm.t 22 Nov 2005 11:07:23 -0000 1.2
@@ -8,7 +8,7 @@
unless ( eval {require Archive::Tar} ) {
plan skip_all => "Archive::Tar not installed; can't test archives.";
} else {
- plan tests => 9;
+ plan tests => 12;
}
@@ -118,6 +118,42 @@
ok $tar->contains_file('blib/html/site/lib/Simple.html');
ok $tar->contains_file('blib/html/bin/hello.html');
+$tar->clear;
+undef( $tar );
+
+$mb->dispatch('realclean');
+$dist->clean;
+
+
+# Make sure html documents are generated for the ppm distro even when
+# they would not be built during a normal build.
+$mb = Module::Build->new_from_context(
+ verbose => 0,
+ quiet => 1,
+
+ installdirs => 'site',
+ config => {
+ html_reset(),
+ installsiteman1dir => catdir($tmp, 'site', 'man', 'man1'),
+ installsiteman3dir => catdir($tmp, 'site', 'man', 'man3'),
+ },
+);
+
+$mb->dispatch('ppmdist');
+is $@, '';
+
+$tar = Archive::Tar->new;
+$tar->read( $tarfile, 1 );
+
+ok $tar->contains_file('blib/html/site/lib/Simple.html');
+ok $tar->contains_file('blib/html/bin/hello.html');
+
+$tar->clear;
+
+$mb->dispatch('realclean');
+$dist->clean;
+
+
chdir( $cwd ) or die "Can''t chdir to '$cwd': $!";
$dist->remove;
Index: common.pl
===================================================================
RCS file: /cvsroot/module-build/Module-Build/t/common.pl,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- common.pl 20 Oct 2005 16:45:19 -0000 1.14
+++ common.pl 22 Nov 2005 11:07:23 -0000 1.15
@@ -61,4 +61,32 @@
return;
}
+
+# A hash of all Config.pm settings related to installing
+# manpages with values set to an empty string.
+sub manpage_reset {
+ return (
+ installman1dir => '',
+ installman3dir => '',
+ installsiteman1dir => '',
+ installsiteman3dir => '',
+ installvendorman1dir => '',
+ installvendorman3dir => '',
+ );
+}
+
+# A hash of all Config.pm settings related to installing
+# html documents with values set to an empty string.
+sub html_reset {
+ return (
+ installhtmldir => '',
+ installhtml1dir => '',
+ installhtml3dir => '',
+ installsitehtml1dir => '',
+ installsitehtml3dir => '',
+ installvendorhtml1dir => '',
+ installvendorhtml3dir => '',
+ );
+}
+
1;
|