Upgrade to ExtUtils::MakeMaker 6.42
[p5sagit/p5-mst-13.2.git] / lib / ExtUtils / t / prereq.t
index 486fee9..c690a55 100644 (file)
@@ -14,7 +14,7 @@ BEGIN {
 }
 
 use strict;
-use Test::More tests => 11;
+use Test::More tests => 13;
 
 use TieOut;
 use MakeMaker::Test::Utils;
@@ -107,4 +107,27 @@ MakeMaker FATAL: prerequisites not found.
 Please install these modules first and rerun 'perl Makefile.PL'.
 END
 
+
+    $warnings = '';
+    eval {
+        WriteMakefile(
+            NAME            => 'Big::Dummy',
+            PREREQ_PM       => {
+                "I::Do::Not::Exist" => 0,
+            },
+            CONFIGURE => sub {
+                require I::Do::Not::Exist;
+            },
+            PREREQ_FATAL    => 1,
+        );
+    };
+    
+    is $warnings, '';
+    is $@, <<'END', "PREREQ_FATAL happens before CONFIGURE";
+MakeMaker FATAL: prerequisites not found.
+    I::Do::Not::Exist not installed
+
+Please install these modules first and rerun 'perl Makefile.PL'.
+END
+
 }