82dee7de92a0bd35 failed to add ext/lib/Makefile.PL. Oops.
[p5sagit/p5-mst-13.2.git] / ext / ExtUtils-MakeMaker / t / WriteEmptyMakefile.t
CommitLineData
277189c8 1#!/usr/bin/perl -w
2
3# This is a test of WriteEmptyMakefile.
4
5BEGIN {
b78fd716 6 unshift @INC, 't/lib';
277189c8 7}
8
9chdir 't';
10
11use strict;
c8d65f10 12use Test::More tests => 5;
277189c8 13
14use ExtUtils::MakeMaker qw(WriteEmptyMakefile);
15use TieOut;
16
17can_ok __PACKAGE__, 'WriteEmptyMakefile';
18
19eval { WriteEmptyMakefile("something"); };
20like $@, qr/Need an even number of args/;
21
22
23{
24 ok( my $stdout = tie *STDOUT, 'TieOut' );
25
26 ok !-e 'wibble';
27 END { 1 while unlink 'wibble' }
28
29 WriteEmptyMakefile(
30 NAME => "Foo",
31 FIRST_MAKEFILE => "wibble",
32 );
33 ok -e 'wibble';
34}