This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Refactor 6 tests in t/op and t/run to use skip_all_if_miniperl().
authorNicholas Clark <nick@ccl4.org>
Mon, 7 Mar 2011 11:00:53 +0000 (11:00 +0000)
committerNicholas Clark <nick@ccl4.org>
Mon, 7 Mar 2011 11:49:10 +0000 (11:49 +0000)
t/op/attrhand.t
t/op/attrs.t
t/op/incfilter.t
t/op/threads-dirh.t
t/op/threads.t
t/run/switchC.t

index 8c89f7f..996d572 100644 (file)
@@ -1,13 +1,10 @@
 #!/usr/bin/perl -w
 
 BEGIN {
-    if ($ENV{PERL_CORE_MINITEST}) {
-       print "1..0 # skip: miniperl can't load attributes\n";
-       exit 0;
-    }
     chdir 't' if -d 't';
     @INC = '../lib';
     require './test.pl';
+    skip_all_if_miniperl("miniperl can't load attributes");
 }
 
 plan tests => 4;
index d568af6..89becf6 100644 (file)
@@ -3,13 +3,10 @@
 # Regression tests for attributes.pm and the C< : attrs> syntax.
 
 BEGIN {
-    if ($ENV{PERL_CORE_MINITEST}) {
-       print "1..0 # skip: miniperl can't load attributes\n";
-       exit 0;
-    }
     chdir 't' if -d 't';
     @INC = '../lib';
     require './test.pl';
+    skip_all_if_miniperl("miniperl can't load attributes");
 }
 
 use warnings;
index 0b763e4..d0e8f75 100644 (file)
@@ -5,15 +5,12 @@
 BEGIN {
     chdir 't' if -d 't';
     @INC = qw(. ../lib);
-    if ($ENV{PERL_CORE_MINITEST}) {
-        print "1..0 # Skip: no dynamic loading on miniperl\n";
-        exit 0;
-    }
+    require 'test.pl';
+    skip_all_if_miniperl('no dynamic loading on miniperl, no Filter::Util::Call');
     unless (find PerlIO::Layer 'perlio') {
        print "1..0 # Skip: not perlio\n";
        exit 0;
     }
-    require "test.pl";
 }
 use strict;
 use Config;
index 616aa6b..900a62a 100644 (file)
@@ -13,10 +13,7 @@ BEGIN {
         print "1..0 # Skip: no ithreads\n";
         exit 0;
      }
-     if ($ENV{PERL_CORE_MINITEST}) {
-       print "1..0 # Skip: no dynamic loading on miniperl, no threads\n";
-       exit 0;
-     }
+     skip_all_if_miniperl("no dynamic loading on miniperl, no threads");
 
      plan(6);
 }
index 4b731f0..94dad6e 100644 (file)
@@ -11,10 +11,7 @@ BEGIN {
         print "1..0 # Skip: no ithreads\n";
         exit 0;
      }
-     if ($ENV{PERL_CORE_MINITEST}) {
-       print "1..0 # Skip: no dynamic loading on miniperl, no threads\n";
-       exit 0;
-     }
+     skip_all_if_miniperl("no dynamic loading on miniperl, no threads");
 
      plan(24);
 }
index b6231ca..9297286 100644 (file)
@@ -5,19 +5,15 @@
 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;
     }
-    if ($ENV{PERL_CORE_MINITEST}) {
-       print "1..0 # Skip : -C and \$ENV{PERL_UNICODE} are disabled on miniperl\n";
-       exit 0;
-    }
-       
+    skip_all_if_miniperl('-C and $ENV{PERL_UNICODE} are disabled on miniperl');
 }
 
-BEGIN { require "./test.pl"; }
-
 plan(tests => 13);
 
 my $r;