summaryrefslogtreecommitdiff
path: root/lib/ExtUtils/t/WriteEmptyMakefile.t
diff options
context:
space:
mode:
authorSteve Peters <steve@fisharerojo.org>2007-07-02 15:39:52 +0000
committerSteve Peters <steve@fisharerojo.org>2007-07-02 15:39:52 +0000
commit277189c8ad3fc0d1dcd4c757f62b0a7bf5bacaa0 (patch)
tree5c8f3e174b3714c1e7556d10e66d7b4f71402e27 /lib/ExtUtils/t/WriteEmptyMakefile.t
parent28f2d4d1a9ee0dc43de025aac86c30a6932449c8 (diff)
downloadperl-277189c8ad3fc0d1dcd4c757f62b0a7bf5bacaa0.tar.gz
Upgrade to ExtUtils-MakeMaker-6.35
p4raw-id: //depot/perl@31519
Diffstat (limited to 'lib/ExtUtils/t/WriteEmptyMakefile.t')
-rw-r--r--lib/ExtUtils/t/WriteEmptyMakefile.t40
1 files changed, 40 insertions, 0 deletions
diff --git a/lib/ExtUtils/t/WriteEmptyMakefile.t b/lib/ExtUtils/t/WriteEmptyMakefile.t
new file mode 100644
index 0000000000..e9db02b881
--- /dev/null
+++ b/lib/ExtUtils/t/WriteEmptyMakefile.t
@@ -0,0 +1,40 @@
+#!/usr/bin/perl -w
+
+# This is a test of WriteEmptyMakefile.
+
+BEGIN {
+ if( $ENV{PERL_CORE} ) {
+ chdir 't' if -d 't';
+ @INC = ('../lib', 'lib');
+ }
+ else {
+ unshift @INC, 't/lib';
+ }
+}
+
+chdir 't';
+
+use strict;
+use Test::More 'no_plan';
+
+use ExtUtils::MakeMaker qw(WriteEmptyMakefile);
+use TieOut;
+
+can_ok __PACKAGE__, 'WriteEmptyMakefile';
+
+eval { WriteEmptyMakefile("something"); };
+like $@, qr/Need an even number of args/;
+
+
+{
+ ok( my $stdout = tie *STDOUT, 'TieOut' );
+
+ ok !-e 'wibble';
+ END { 1 while unlink 'wibble' }
+
+ WriteEmptyMakefile(
+ NAME => "Foo",
+ FIRST_MAKEFILE => "wibble",
+ );
+ ok -e 'wibble';
+}