3 # This is a test of the verification of the arguments to
11 use Test::More tests => 16;
14 use MakeMaker::Test::Utils;
15 use MakeMaker::Test::Setup::BFD;
17 use ExtUtils::MakeMaker;
23 ok( setup_recurs(), 'setup' );
25 ok( chdir File::Spec->updir );
26 ok( teardown_recurs(), 'teardown' );
29 ok( chdir 'Big-Dummy', "chdir'd to Big-Dummy" ) ||
30 diag("chdir failed: $!");
33 ok( my $stdout = tie *STDOUT, 'TieOut' );
35 local $SIG{__WARN__} = sub {
36 $warnings .= join '', @_;
38 # prerequisite warnings are disabled while building the perl core:
39 local $ENV{PERL_CORE} = 0;
57 sprintf("Warning: prerequisite strict 99999 not found. We have %s.\n",
64 "I::Do::Not::Exist" => 0,
68 "Warning: prerequisite I::Do::Not::Exist 0 not found.\n";
75 "I::Do::Not::Exist" => "",
78 my @warnings = split /\n/, $warnings;
80 like $warnings[0], qr{^Unparsable version '' for prerequisite I::Do::Not::Exist\b};
81 is $warnings[1], "Warning: prerequisite I::Do::Not::Exist 0 not found.";
88 "I::Do::Not::Exist" => 0,
93 "Warning: prerequisite I::Do::Not::Exist 0 not found.\n".
94 sprintf("Warning: prerequisite strict 99999 not found. We have %s.\n",
100 NAME => 'Big::Dummy',
102 "I::Do::Not::Exist" => 0,
111 is $@, <<'END', "PREREQ_FATAL";
112 MakeMaker FATAL: prerequisites not found.
113 I::Do::Not::Exist not installed
114 Nor::Do::I not installed
117 Please install these modules first and rerun 'perl Makefile.PL'.
124 NAME => 'Big::Dummy',
126 "I::Do::Not::Exist" => 0,
129 require I::Do::Not::Exist;
136 is $@, <<'END', "PREREQ_FATAL happens before CONFIGURE";
137 MakeMaker FATAL: prerequisites not found.
138 I::Do::Not::Exist not installed
140 Please install these modules first and rerun 'perl Makefile.PL'.