1 # Test problems in Makefile.PL's and hint files.
9 use Test::More tests => 6;
11 use MakeMaker::Test::Setup::Problem;
14 my $MM = bless { DIR => ['subdir'] }, 'MM';
16 ok( setup_recurs(), 'setup' );
18 ok( chdir File::Spec->updir );
19 ok( teardown_recurs(), 'teardown' );
22 ok( chdir 'Problem-Module', "chdir'd to Problem-Module" ) ||
23 diag("chdir failed: $!");
26 # Make sure when Makefile.PL's break, they issue a warning.
27 # Also make sure Makefile.PL's in subdirs still have '.' in @INC.
29 my $stdout = tie *STDOUT, 'TieOut' or die;
32 local $SIG{__WARN__} = sub { $warning = join '', @_ };
33 eval { $MM->eval_in_subdirs; };
35 is( $stdout->read, qq{\@INC has .\n}, 'cwd in @INC' );
37 qr{^ERROR from evaluation of .*subdir.*Makefile.PL: YYYAaaaakkk},
38 'Makefile.PL death in subdir warns' );