Update of /cvsroot/module-build/Module-Build/t
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26889/t
Modified Files:
Tag: release-0_26_branch
install.t
Log Message:
--install_path should override --install_base
Index: install.t
===================================================================
RCS file: /cvsroot/module-build/Module-Build/t/install.t,v
retrieving revision 1.12.2.3
retrieving revision 1.12.2.4
diff -u -d -r1.12.2.3 -r1.12.2.4
--- install.t 16 Mar 2005 16:51:42 -0000 1.12.2.3
+++ install.t 23 Mar 2005 01:16:56 -0000 1.12.2.4
@@ -1,7 +1,7 @@
use strict;
use Test;
-BEGIN { plan tests => 29 }
+BEGIN { plan tests => 31 }
use Module::Build;
use File::Spec;
use File::Path;
@@ -130,11 +130,10 @@
'--install_base', $basedir])};
ok $@, '';
- my $relpath = $build->install_base_relative('lib');
- $install_to = File::Spec->catfile($destdir, $basedir, $relpath, 'Sample.pm');
- print "# Should have installed module as $install_to\n";
- ok -e $install_to;
-
+ my $relpath = $build->install_base_relative('script');
+ $install_to = File::Spec->catfile($destdir, $basedir, $relpath, 'sample.pl');
+ ok -e $install_to, 1, "Should install script as $install_to";
+
eval {$build->dispatch('realclean')};
ok $@, '';
}
@@ -156,6 +155,16 @@
ok keys %$pms, 0;
}
+{
+ # Make sure install_path overrides install_base
+ my $build = new Module::Build( module_name => 'Sample',
+ install_base => 'foo',
+ install_path => { lib => 'bar' },
+ license => 'perl' );
+ ok $build;
+ ok $build->install_destination('lib'), 'bar';
+}
+
sub strip_volume {
my $dir = shift;
(undef, $dir) = File::Spec->splitpath( $dir, 1 );
|