From: Jarkko Hietaniemi Date: Mon, 14 Apr 2003 20:02:04 +0000 (+0000) Subject: Skip as early as possible if no perlio since the X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=491abfa0d3660abd254acccb4ce25347d4e51152;p=p5sagit%2Fp5-mst-13.2.git Skip as early as possible if no perlio since the use open would be compile-time. p4raw-id: //depot/perl@19208 --- diff --git a/t/io/layers.t b/t/io/layers.t index 1596d72..15359c1 100644 --- a/t/io/layers.t +++ b/t/io/layers.t @@ -4,15 +4,19 @@ BEGIN { chdir 't' if -d 't'; @INC = '../lib'; require './test.pl'; + unless (find PerlIO::Layer 'perlio') { + print "1..0 # Skip: not perlio\n"; + exit 0; + } } plan tests => 43; use Config; -{ - skip("This perl does not have perlio and Encode", 43) - unless $Config{useperlio} && " $Config{extensions} " =~ / Encode /; +SKIP: { + skip("This perl does not have Encode", 43) + unless " $Config{extensions} " =~ / Encode /; sub check { my ($result, $expected, $id) = @_; @@ -98,6 +102,7 @@ use Config; { use open(IN => ":crlf", OUT => ":encoding(cp1252)"); + open F, "afile";