In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/028bf728e74682b00bb4314e33ce78574dee577a?hp=944f72d3c889b5f59497cfe286d5e11d4e2ff2b8>
- Log ----------------------------------------------------------------- commit 028bf728e74682b00bb4314e33ce78574dee577a Author: Nicholas Clark <[email protected]> Date: Mon Mar 7 19:54:38 2011 +0000 Refactor 4 tests to use skip_all(), instead of longhand code to generate TAP. M t/japh/abigail.t M t/lib/cygwin.t M t/op/numconvert.t M t/porting/FindExt.t commit a7af648ea0c026146d2bd0195695342a9cddc338 Author: Nicholas Clark <[email protected]> Date: Mon Mar 7 19:53:37 2011 +0000 Refactor t/op/getpid.t to use skip_all_if_miniperl() in place of explicit code. M t/op/getpid.t ----------------------------------------------------------------------- Summary of changes: t/japh/abigail.t | 5 +---- t/lib/cygwin.t | 5 +---- t/op/getpid.t | 5 +---- t/op/numconvert.t | 15 +++++---------- t/porting/FindExt.t | 6 ++---- 5 files changed, 10 insertions(+), 26 deletions(-) diff --git a/t/japh/abigail.t b/t/japh/abigail.t index f397bb9..f5115bc 100644 --- a/t/japh/abigail.t +++ b/t/japh/abigail.t @@ -24,13 +24,10 @@ # 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; } diff --git a/t/lib/cygwin.t b/t/lib/cygwin.t index e4fde17..9033d3f 100644 --- a/t/lib/cygwin.t +++ b/t/lib/cygwin.t @@ -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); diff --git a/t/op/getpid.t b/t/op/getpid.t index ac066d5..a06a0c6 100644 --- a/t/op/getpid.t +++ b/t/op/getpid.t @@ -13,10 +13,7 @@ use Config; BEGIN { skip_all_without_config($_) foreach qw(useithreads d_getppid); - 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"); eval 'use threads; use threads::shared'; plan tests => 3; if ($@) { diff --git a/t/op/numconvert.t b/t/op/numconvert.t index 73a3586..758369e 100644 --- a/t/op/numconvert.t +++ b/t/op/numconvert.t @@ -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 diff --git a/t/porting/FindExt.t b/t/porting/FindExt.t index 0100cb1..165ae14 100644 --- a/t/porting/FindExt.t +++ b/t/porting/FindExt.t @@ -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; -- Perl5 Master Repository
