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;
$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(
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