diff options
author | Yitzchak Scott-Thoennes <sthoenna@efn.org> | 2007-02-25 16:45:10 -0800 |
---|---|---|
committer | Steve Hay <SteveHay@planit.com> | 2007-02-26 13:27:58 +0000 |
commit | 57d226e4c036539e44197f78a5d0e896298c6424 (patch) | |
tree | f33af97d503374bb69d33432203b2e8e3575590b /ext/Win32API | |
parent | 8d9043d1bc80ac715c1a2b9c0b993067de5ccb86 (diff) | |
download | perl-57d226e4c036539e44197f78a5d0e896298c6424.tar.gz |
Re: [PATCH] Re: Win32 modules & cygwin
From: "Yitzchak Scott-Thoennes" <sthoenna@efn.org>
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
Diffstat (limited to 'ext/Win32API')
-rw-r--r-- | ext/Win32API/File/t/file.t | 15 | ||||
-rw-r--r-- | ext/Win32API/File/t/tie.t | 15 |
2 files changed, 28 insertions, 2 deletions
diff --git a/ext/Win32API/File/t/file.t b/ext/Win32API/File/t/file.t index 27cfc28225..d89ea9107f 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:(?<!\S)Win32API/File(?!\S): ) { + print "1..0 # Skip Win32API::File extension not built\n"; + exit(); + } + } + + print "1..267\n"; +} END {print "not ok 1\n" unless $loaded;} # Win32API::File does an implicit "require Win32", but diff --git a/ext/Win32API/File/t/tie.t b/ext/Win32API/File/t/tie.t index ec2f7c2cf9..ec4ab83e63 100644 --- a/ext/Win32API/File/t/tie.t +++ b/ext/Win32API/File/t/tie.t @@ -1,7 +1,20 @@ #!perl # vim:syntax=perl: -BEGIN { $|= 1; print "1..10\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:(?<!\S)Win32API/File(?!\S): ) { + print "1..0 # Skip Win32API::File extension not built\n"; + exit(); + } + } + + print "1..10\n"; +} END { print "not ok 1\n" unless $main::loaded; } use strict; |