Update of /cvsroot/module-build/Module-Build/t
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1314/t
Modified Files:
destinations.t
Log Message:
Convert to Test::More.
Don't bother checking to see if we're loaded from blib, its really not
this test's problem.
Index: destinations.t
===================================================================
RCS file: /cvsroot/module-build/Module-Build/t/destinations.t,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- destinations.t 20 Jun 2005 18:22:35 -0000 1.5
+++ destinations.t 20 Jun 2005 22:57:19 -0000 1.6
@@ -1,10 +1,6 @@
-use strict;
-
-use Test;
-BEGIN { plan tests => 32 }
+#!/usr/bin/perl -w
-use Module::Build;
-ok(1);
+use strict;
use Config;
use File::Spec::Functions qw( catdir );
@@ -16,34 +12,38 @@
require $common_pl;
}
-ok( $INC{'Module/Build.pm'}, '/blib/', "Make sure Module::Build was loaded from blib/");
+
+use Test::More tests => 31;
+
+use_ok 'Module::Build';
+
my $m = Module::Build->current;
-ok( UNIVERSAL::isa( $m, 'Module::Build::Base' ) );
+isa_ok( $m, 'Module::Build::Base' );
ok( !defined $m->install_base );
ok( !defined $m->prefix );
# Do default tests here
-ok( $m->install_destination( 'lib' ), $Config{ installsitelib } );
-ok( $m->install_destination( 'arch' ), $Config{ installsitearch } );
-ok( $m->install_destination( 'bin' ), $Config{ installsitebin } || $Config{ installbin } );
-ok( $m->install_destination( 'script' ), $Config{ installsitescript } || $Config{ installsitebin } || $Config{ installscript } );
-ok( $m->install_destination( 'bindoc' ), $Config{ installsiteman1dir } || $Config{ installman1dir } );
-ok( $m->install_destination( 'libdoc' ), $Config{ installsiteman3dir } || $Config{ installman3dir } );
+is( $m->install_destination( 'lib' ), $Config{ installsitelib } );
+is( $m->install_destination( 'arch' ), $Config{ installsitearch } );
+is( $m->install_destination( 'bin' ), $Config{ installsitebin } || $Config{ installbin } );
+is( $m->install_destination( 'script' ), $Config{ installsitescript } || $Config{ installsitebin } || $Config{ installscript } );
+is( $m->install_destination( 'bindoc' ), $Config{ installsiteman1dir } || $Config{ installman1dir } );
+is( $m->install_destination( 'libdoc' ), $Config{ installsiteman3dir } || $Config{ installman3dir } );
my $install_base = catdir( 'foo', 'bar' );
$m->install_base( $install_base );
ok( !defined $m->prefix );
-ok( $m->install_destination( 'lib' ), catdir( $install_base, 'lib', 'perl5' ) );
-ok( $m->install_destination( 'arch' ), catdir( $install_base, 'lib', 'perl5', $Config{archname} ) );
-ok( $m->install_destination( 'bin' ), catdir( $install_base, 'bin' ) );
-ok( $m->install_destination( 'script' ), catdir( $install_base, 'bin' ) );
-ok( $m->install_destination( 'bindoc' ), catdir( $install_base, 'man', 'man1') );
-ok( $m->install_destination( 'libdoc' ), catdir( $install_base, 'man', 'man3' ) );
+is( $m->install_destination( 'lib' ), catdir( $install_base, 'lib', 'perl5' ) );
+is( $m->install_destination( 'arch' ), catdir( $install_base, 'lib', 'perl5', $Config{archname} ) );
+is( $m->install_destination( 'bin' ), catdir( $install_base, 'bin' ) );
+is( $m->install_destination( 'script' ), catdir( $install_base, 'bin' ) );
+is( $m->install_destination( 'bindoc' ), catdir( $install_base, 'man', 'man1') );
+is( $m->install_destination( 'libdoc' ), catdir( $install_base, 'man', 'man3' ) );
$m->install_base( undef );
ok( !defined $m->install_base );
@@ -63,7 +63,7 @@
my $prefix = catdir( qw( some prefix ) );
$m->prefix( $prefix );
-ok( $m->{properties}{prefix} eq $prefix );
+is( $m->{properties}{prefix}, $prefix );
my $c = \%Config;
@@ -77,12 +77,12 @@
$m->install_base( $install_base );
-ok( $m->install_destination( 'lib' ), catdir( $install_base, 'lib', 'perl5' ) );
-ok( $m->install_destination( 'arch' ), catdir( $install_base, 'lib', 'perl5', $Config{archname} ) );
-ok( $m->install_destination( 'bin' ), catdir( $install_base, 'bin' ) );
-ok( $m->install_destination( 'script' ), catdir( $install_base, 'bin' ) );
-ok( $m->install_destination( 'bindoc' ), catdir( $install_base, 'man', 'man1') );
-ok( $m->install_destination( 'libdoc' ), catdir( $install_base, 'man', 'man3' ) );
+is( $m->install_destination( 'lib' ), catdir( $install_base, 'lib', 'perl5' ) );
+is( $m->install_destination( 'arch' ), catdir( $install_base, 'lib', 'perl5', $Config{archname} ) );
+is( $m->install_destination( 'bin' ), catdir( $install_base, 'bin' ) );
+is( $m->install_destination( 'script' ), catdir( $install_base, 'bin' ) );
+is( $m->install_destination( 'bindoc' ), catdir( $install_base, 'man', 'man1') );
+is( $m->install_destination( 'libdoc' ), catdir( $install_base, 'man', 'man3' ) );
sub test_prefix {
my ($type) = @_;
@@ -93,6 +93,6 @@
return;
}
- ok( $dest, "/^\Q$prefix\E/");
+ like( $dest, "/^\Q$prefix\E/");
}
|