Update of /cvsroot/module-build/Module-Build/t
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22551
Modified Files:
destinations.t
Log Message:
Split out a little functionette
Index: destinations.t
===================================================================
RCS file: /cvsroot/module-build/Module-Build/t/destinations.t,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -d -r1.28 -r1.29
--- destinations.t 28 Sep 2005 04:23:20 -0000 1.28
+++ destinations.t 28 Sep 2005 04:37:15 -0000 1.29
@@ -191,14 +191,18 @@
ok $mb->dir_contains($prefix, $dest), "$type prefixed";
if( $test_config && $test_config->{$type} ) {
- my @dest_dirs = splitdir( $dest );
- my @test_dirs = splitdir( $test_config->{$type} );
-
- is( $dest_dirs[-1], $test_dirs[-1], " suffix correctish ($test_config->{$type} + $prefix = $dest)" );
+ have_same_ending($dest, $test_config->{$type},
+ " suffix correctish ($test_config->{$type} + $prefix = $dest)" );
}
}
}
+sub have_same_ending {
+ my ($dir1, $dir2, $message) = @_;
+ my @dir1 = splitdir $dir1;
+ my @dir2 = splitdir $dir2;
+ is $dir1[-1], $dir2[-1], $message;
+}
sub test_install_destinations {
my($build, $expect) = @_;
|