This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Refactor 4 tests to use skip_all(), instead of longhand code to generate TAP.
authorNicholas Clark <nick@ccl4.org>
Mon, 7 Mar 2011 19:54:38 +0000 (19:54 +0000)
committerNicholas Clark <nick@ccl4.org>
Mon, 7 Mar 2011 19:54:38 +0000 (19:54 +0000)
t/japh/abigail.t
t/lib/cygwin.t
t/op/numconvert.t
t/porting/FindExt.t

index f397bb9..f5115bc 100644 (file)
 #
 
 BEGIN {
-    if (ord("A") == 193) {
-       print "1..0 # Skip: EBCDIC\n"; # For now, until someone has time.
-       exit(0);
-    }
     chdir 't' if -d 't';
     @INC = '../lib';
     require "./test.pl";
+    skip_all('EBCDIC') if $::IS_EBCDIC;
     undef &skip;
 }
 
index e4fde17..9033d3f 100644 (file)
@@ -3,11 +3,8 @@
 BEGIN {
     chdir 't' if -d 't';
     @INC = ('../lib');
-    unless ($^O eq "cygwin") {
-       print "1..0 # skipped: cygwin specific test\n";
-       exit 0;
-    }
     require './test.pl';
+    skip_all('cygwin specific test') unless $^O eq 'cygwin';
 }
 
 plan(tests => 16);
index 73a3586..758369e 100644 (file)
@@ -54,18 +54,13 @@ my $max_uv_less3 = $max_uv1 - 3;
 print "# max_uv1 = $max_uv1, max_uv2 = $max_uv2, big_iv = $big_iv\n";
 print "# max_uv_less3 = $max_uv_less3\n";
 if ($max_uv1 ne $max_uv2 or $big_iv > $max_uv1 or $max_uv1 == $max_uv_less3) {
-  print "1..0 # skipped: unsigned perl arithmetic is not sane";
-  eval { require Config; import Config };
-  use vars qw(%Config);
-  if ($Config{d_quad} eq 'define') {
-      print " (common in 64-bit platforms)";
-  }
-  print "\n";
-  exit 0;
+  eval { require Config; };
+  my $message = 'unsigned perl arithmetic is not sane';
+  $message .= " (common in 64-bit platforms)" if $Config::Config{d_quad};
+  skip_all($message);
 }
 if ($max_uv_less3 =~ tr/0-9//c) {
-  print "1..0 # skipped: this perl stringifies large unsigned integers using E notation\n";
-  exit 0;
+  skip_all('this perl stringifies large unsigned integers using E notation');
 }
 
 my $st_t = 4*4;                        # We try 4 initializers and 4 reporters
index 0100cb1..165ae14 100644 (file)
@@ -1,12 +1,10 @@
 #!../miniperl -w
 
 BEGIN {
-    if ($^O eq 'VMS') {
-        print "1..0 # FindExt not portable.\n";
-        exit 0;
-    }
     @INC = qw(../win32 ../lib);
     require './test.pl';
+    skip_all('FindExt not portable')
+       if $^O eq 'VMS';
 }
 use strict;
 use Config;