1#!/usr/bin/perl -w 2 3# This is a test of WriteEmptyMakefile. 4 5BEGIN { 6 unshift @INC, 't/lib'; 7} 8 9chdir 't'; 10 11use strict; 12use Test::More tests => 5; 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} 35