In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/95e2dc41df5a5b893cbc879e1fce6d1a86aa8711?hp=b5b7b9adf9fbdc829b735710863e92d10a0676b8>

- Log -----------------------------------------------------------------
commit 95e2dc41df5a5b893cbc879e1fce6d1a86aa8711
Author: Nicholas Clark <[email protected]>
Date:   Mon Mar 7 17:36:55 2011 +0000

    Refactor 5 tests to use skip_all(), instead of generating TAP locally.

M       t/io/layers.t
M       t/io/through.t
M       t/op/fork.t
M       t/op/lfs.t
M       t/uni/lex_utf8.t

commit fa71130c50712ca92335bb3b5c6deef0700bc24d
Author: Nicholas Clark <[email protected]>
Date:   Mon Mar 7 17:10:26 2011 +0000

    Refactor t/lib/proxy_constant_subs.t to use skip_all_without_extension()

M       t/lib/proxy_constant_subs.t
-----------------------------------------------------------------------

Summary of changes:
 t/io/layers.t               |    7 ++-----
 t/io/through.t              |    8 +++-----
 t/lib/proxy_constant_subs.t |   13 +++----------
 t/op/fork.t                 |   14 +++++---------
 t/op/lfs.t                  |   10 ++++------
 t/uni/lex_utf8.t            |    5 +----
 6 files changed, 18 insertions(+), 39 deletions(-)

diff --git a/t/io/layers.t b/t/io/layers.t
index 4e42043..d0b55f1 100644
--- a/t/io/layers.t
+++ b/t/io/layers.t
@@ -13,11 +13,8 @@ BEGIN {
 
     # Makes testing easier.
     $ENV{PERLIO} = 'stdio' if exists $ENV{PERLIO} && $ENV{PERLIO} eq '';
-    if (exists $ENV{PERLIO} && $ENV{PERLIO} !~ /^(stdio|perlio|mmap)$/) {
-       # We are not prepared for anything else.
-       print "1..0 # PERLIO='$ENV{PERLIO}' unknown\n";
-       exit 0;
-    }
+    skip_all("PERLIO='$ENV{PERLIO}' unknown")
+       if exists $ENV{PERLIO} && $ENV{PERLIO} !~ /^(stdio|perlio|mmap)$/;
     $PERLIO = exists $ENV{PERLIO} ? $ENV{PERLIO} : "(undef)";
 }
 
diff --git a/t/io/through.t b/t/io/through.t
index a76c64d..315de90 100644
--- a/t/io/through.t
+++ b/t/io/through.t
@@ -1,16 +1,14 @@
 #!./perl
 
 BEGIN {
-    if ($^O eq 'VMS') {
-        print "1..0 # Skip on VMS -- too picky about line endings for 
record-oriented pipes\n";
-        exit;
-    }
     chdir 't' if -d 't';
     @INC = '../lib';
+    require './test.pl';
+    skip_all("VMS too picky about line endings for record-oriented pipes")
+       if $^O eq 'VMS';
 }
 
 use strict;
-require './test.pl';
 
 my $Perl = which_perl();
 
diff --git a/t/lib/proxy_constant_subs.t b/t/lib/proxy_constant_subs.t
index 7c00830..c6de618 100644
--- a/t/lib/proxy_constant_subs.t
+++ b/t/lib/proxy_constant_subs.t
@@ -1,18 +1,11 @@
 my @symbols;
 BEGIN {
-    require Config;
-    if (($Config::Config{'extensions'} !~ /\bB\b/) ){
-        print "1..0 # Skip -- Perl configured without B module\n";
-        exit 0;
-    }
-    if ($Config::Config{'extensions'} !~ /\bFcntl\b/) {
-        print "1..0 # Skip -- Perl configured without Fcntl\n";
-        exit 0;
-    }
+    require './test.pl';
+    skip_all_without_extension('B');
+    skip_all_without_extension('Fcntl');
     # S_IFMT is a real subroutine, and acts as control
     # SEEK_SET is a proxy constant subroutine.
     @symbols = qw(S_IFMT SEEK_SET);
-    require './test.pl';
 }
 
 use strict;
diff --git a/t/op/fork.t b/t/op/fork.t
index d1b6e5b..3c40394 100644
--- a/t/op/fork.t
+++ b/t/op/fork.t
@@ -5,19 +5,15 @@
 BEGIN {
     chdir 't' if -d 't';
     @INC = '../lib';
-    require Config; import Config;
-    unless ($Config{'d_fork'} or $Config{'d_pseudofork'}) {
-       print "1..0 # Skip: no fork\n";
-       exit 0;
-    }
     $ENV{PERL5LIB} = "../lib";
     require './test.pl';
+    require Config;
+    skip_all('no fork')
+       unless ($Config::Config{d_fork} or $Config::Config{d_pseudofork});
 }
 
-if ($^O eq 'mpeix') {
-    print "1..0 # Skip: fork/status problems on MPE/iX\n";
-    exit 0;
-}
+skip_all('fork/status problems on MPE/iX')
+    if $^O eq 'mpeix';
 
 $|=1;
 
diff --git a/t/op/lfs.t b/t/op/lfs.t
index aac3d34..f06d192 100644
--- a/t/op/lfs.t
+++ b/t/op/lfs.t
@@ -5,13 +5,11 @@
 BEGIN {
        chdir 't' if -d 't';
        @INC = '../lib';
-       # Don't bother if there are no quad offsets.
-       require Config; import Config;
-       if ($Config{lseeksize} < 8) {
-               print "1..0 # Skip: no 64-bit file offsets\n";
-               exit(0);
-       }
        require './test.pl';
+       require Config;
+       # Don't bother if there are no quad offsets.
+       skip_all('no 64-bit file offsets')
+               if $Config::Config{lseeksize} < 8;
 }
 
 use strict;
diff --git a/t/uni/lex_utf8.t b/t/uni/lex_utf8.t
index a5747cb..e080245 100644
--- a/t/uni/lex_utf8.t
+++ b/t/uni/lex_utf8.t
@@ -3,14 +3,11 @@
 # This script is written intentionally in UTF-8
 
 BEGIN {
-    if (ord("A") == 193) {
-        print "1..0 # Skip: EBCDIC\n";
-        exit 0;
-    }
     $| = 1;
 
     require './test.pl';
     skip_all_if_miniperl("no dynamic loading on miniperl, no re");
+    skip_all('EBCDIC') if $::IS_EBCDIC;
 }
 
 use strict;

--
Perl5 Master Repository

Reply via email to