From: Nicholas Clark Date: Fri, 18 Jun 2004 13:24:13 +0000 (+0000) Subject: Skip tests when PerlIO::scalar and PerlIO::via aren't built X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=740dabb8e3624026adcaa7b5289cda916efa612a;p=p5sagit%2Fp5-mst-13.2.git Skip tests when PerlIO::scalar and PerlIO::via aren't built p4raw-id: //depot/perl@22956 --- diff --git a/ext/PerlIO/t/scalar.t b/ext/PerlIO/t/scalar.t index 01e12b0..a4c4799 100644 --- a/ext/PerlIO/t/scalar.t +++ b/ext/PerlIO/t/scalar.t @@ -7,6 +7,11 @@ BEGIN { print "1..0 # Skip: not perlio\n"; exit 0; } + require Config; + if (($Config::Config{'extensions'} !~ /\bPerlIO::scalar\b/) ){ + print "1..0 # Skip -- Perl configured without PerlIO::scalar module\n"; + exit 0; + } } $| = 1; diff --git a/ext/PerlIO/t/via.t b/ext/PerlIO/t/via.t index 124efbd..0d819df 100644 --- a/ext/PerlIO/t/via.t +++ b/ext/PerlIO/t/via.t @@ -1,8 +1,5 @@ #!./perl -use strict; -use warnings; - BEGIN { chdir 't' if -d 't'; @INC = '../lib'; @@ -10,8 +7,16 @@ BEGIN { print "1..0 # Skip: not perlio\n"; exit 0; } + require Config; + if (($Config::Config{'extensions'} !~ /\bPerlIO::via\b/) ){ + print "1..0 # Skip -- Perl configured without PerlIO::via module\n"; + exit 0; + } } +use strict; +use warnings; + my $tmp = "via$$"; use Test::More tests => 18;