8 blib_load('Module::Build');
10 #########################
12 my $tmp = MBTest->tmpdir;
14 # Create test distribution; set requires and build_requires
16 my $dist = DistGen->new( dir => $tmp );
22 #########################
24 my $mb; stdout_of(sub{ $mb = Module::Build->new_from_context});
26 blib_load('Module::Build::Compat');
31 sub{ Module::Build::Compat->create_makefile_pl('passthrough', $mb); }
34 # as silly as all of this exit(0) business is, that is what the cpan
35 # testers have instructed everybody to do so...
36 $dist->change_file('Build.PL' =>
37 "warn qq(you have no libthbbt\n); exit;\n" . $dist->get_file('Build.PL')
42 stdout_of(sub{ $mb->ACTION_realclean });
45 my ($stdout, $stderr ) = stdout_stderr_of (sub {
46 $result = $mb->run_perl_script('Makefile.PL');
48 ok $result, "Makefile.PL exit";
49 like $stdout, qr/running Build\.PL/;
50 like $stderr, qr/you have no libthbbt$/;
51 #warn "out: $stdout"; warn "err: $stderr";
53 # vim:ts=2:sw=2:et:sta