This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Skip tests if Encode not built
authorJerry D. Hedden <jdhedden@cpan.org>
Tue, 27 Feb 2007 11:27:58 +0000 (03:27 -0800)
committerNicholas Clark <nick@ccl4.org>
Tue, 27 Feb 2007 20:36:14 +0000 (20:36 +0000)
From: "Jerry D. Hedden" <jdhedden@yahoo.com>
Message-ID: <176638.9767.qm@web30207.mail.mud.yahoo.com>

p4raw-id: //depot/perl@30419

lib/Pod/Simple/t/corpustest.t
lib/encoding/warnings/t/4-lexical.t

index b37f77c..291edd6 100644 (file)
@@ -3,6 +3,12 @@ BEGIN {
         chdir 't';
         @INC = '../lib';
     }
+
+    use Config;
+    if ($Config::Config{'extensions'} !~ /\bEncode\b/) {
+      print "1..0 # Skip: Encode was not built\n";
+      exit 0;
+    }
 }
 
 #use Pod::Simple::Debug (10);
index 5031cf3..e80c504 100644 (file)
@@ -1,6 +1,14 @@
 use strict;
 use Test;
-BEGIN { plan tests => 3 }
+BEGIN {
+    use Config;
+    if ($Config::Config{'extensions'} !~ /\bEncode\b/) {
+      print "1..0 # Skip: Encode was not built\n";
+      exit 0;
+    }
+
+    plan tests => 3;
+}
 
 {
     use encoding::warnings;