From: Yitzchak Scott-Thoennes Date: Mon, 26 Feb 2007 00:45:10 +0000 (-0800) Subject: Re: [PATCH] Re: Win32 modules & cygwin X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=57d226e4c036539e44197f78a5d0e896298c6424;p=p5sagit%2Fp5-mst-13.2.git Re: [PATCH] Re: Win32 modules & cygwin From: "Yitzchak Scott-Thoennes" Message-ID: <1300.63.226.247.142.1172479510.squirrel@63.226.247.142> (Stops Win32* extension tests from being run when the corresponding extensions haven't been built) p4raw-id: //depot/perl@30409 --- diff --git a/ext/Win32API/File/t/file.t b/ext/Win32API/File/t/file.t index 27cfc28..d89ea91 100644 --- a/ext/Win32API/File/t/file.t +++ b/ext/Win32API/File/t/file.t @@ -4,7 +4,20 @@ ######################### We start with some black magic to print on failure. -BEGIN { $|= 1; print "1..267\n"; } +BEGIN { + $|= 1; + + # when building perl, skip this test if Win32API::File isn't being built + if ( $ENV{PERL_CORE} ) { + require Config; + if ( $Config::Config{extensions} !~ m:(? 1 }; -use Win32CORE; -ok(1); +use Test::More; +BEGIN { + if ( $ENV{PERL_CORE} ) { + require Config; + if ( $Config::Config{extensions} !~ /(? "Win32CORE extension not built"; + exit(); + } + } + + plan tests => 1; +}; +use_ok( "Win32CORE" );