Upgrade to Module-Build-0.30
[p5sagit/p5-mst-13.2.git] / lib / Module / Build / t / test_type.t
index 99ae121..598ddb1 100644 (file)
@@ -9,10 +9,11 @@ BEGIN {
 
 use strict;
 use lib $ENV{PERL_CORE} ? '../lib/Module/Build/t/lib' : 't/lib';
-use MBTest tests => 8;
+use MBTest tests => 9;
+
+use_ok 'Module::Build';
+ensure_blib('Module::Build');
 
-use Cwd ();
-my $cwd = Cwd::cwd;
 my $tmp = MBTest->tmpdir;
 
 use DistGen;
@@ -29,12 +30,10 @@ ok(1, 'second test in special_ext');
 
 $dist->regen;
 
-chdir( $dist->dirname ) or die "Can't chdir to '@{[$dist->dirname]}': $!";
+$dist->chdir_in;
 
 #########################
 
-use_ok 'Module::Build';
-
 # Here we make sure we can define an action that will test a particular type
 $::x = 0;
 my $mb = Module::Build->subclass(
@@ -69,11 +68,10 @@ is( $::x, 2, "called again");
 my $output = uc(stdout_of(
     sub {$mb->dispatch('testspecial', verbose => 0)}
 ));
-like($output, qr/\.\.OK/);
+like($output, qr/\.\. ?OK/);
 
 is($::x, 3, "called a third time");
 
-chdir( $cwd ) or die "Can't chdir to '$cwd': $!";
 $dist->remove;
 
 # vim:ts=4:sw=4:et:sta