diff options
author | Nicholas Clark <nick@ccl4.org> | 2011-03-07 21:55:36 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2011-03-07 21:55:36 +0000 |
commit | d3d1232e4b14141281f4266718249fa2750cd14e (patch) | |
tree | 602ff745324e4f64ecade6a63bcbe50aae95c063 | |
parent | b93d0e6249447a8bdcbd59208d8e8138756bae7c (diff) | |
download | perl-d3d1232e4b14141281f4266718249fa2750cd14e.tar.gz |
Refactor 4 tests to use skip_if_miniperl().
-rw-r--r-- | t/io/open.t | 3 | ||||
-rw-r--r-- | t/op/magic.t | 5 | ||||
-rw-r--r-- | t/op/smartmatch.t | 9 | ||||
-rw-r--r-- | t/op/write.t | 6 |
4 files changed, 9 insertions, 14 deletions
diff --git a/t/io/open.t b/t/io/open.t index 347bdc0ab1..57412eb7e6 100644 --- a/t/io/open.t +++ b/t/io/open.t @@ -228,8 +228,7 @@ like( $@, qr/Bad filehandle:\s+$afile/, ' right error' ); SKIP: { skip "This perl uses perlio", 1 if $Config{useperlio}; - skip "miniperl cannot be relied on to load %Errno" - if $ENV{PERL_CORE_MINITEST}; + skip_if_miniperl("miniperl can't rely on loading %Errno", 1); # Force the reference to %! to be run time by writing ! as {"!"} skip "This system doesn't understand EINVAL", 1 unless exists ${"!"}{EINVAL}; diff --git a/t/op/magic.t b/t/op/magic.t index 403cba7ce6..a8247c0c50 100644 --- a/t/op/magic.t +++ b/t/op/magic.t @@ -21,7 +21,6 @@ $Is_Dos = $^O eq 'dos'; $Is_os2 = $^O eq 'os2'; $Is_Cygwin = $^O eq 'cygwin'; $Is_MPE = $^O eq 'mpeix'; -$Is_miniperl = $ENV{PERL_CORE_MINITEST}; $Is_BeOS = $^O eq 'beos'; $PERL = $ENV{PERL} @@ -335,7 +334,7 @@ EOP } SKIP: { - skip ("miniperl can't rely on loading %Errno", 2) if $Is_miniperl; + skip_if_miniperl("miniperl can't rely on loading %Errno", 2); no warnings 'void'; # Make sure Errno hasn't been prematurely autoloaded @@ -351,7 +350,7 @@ SKIP: { } SKIP: { - skip ("miniperl can't rely on loading %Errno") if $Is_miniperl; + skip_if_miniperl("miniperl can't rely on loading %Errno", 1); # Make sure that Errno loading doesn't clobber $! undef %Errno::; diff --git a/t/op/smartmatch.t b/t/op/smartmatch.t index f14e91ca94..da4840eaca 100644 --- a/t/op/smartmatch.t +++ b/t/op/smartmatch.t @@ -11,7 +11,6 @@ no warnings 'uninitialized'; use Tie::Array; use Tie::Hash; -use if !$ENV{PERL_CORE_MINITEST}, "Tie::RefHash"; # Predeclare vars used in the tests: my @empty; @@ -62,7 +61,8 @@ our $obj = Test::Object::NoOverload->new; our $str_obj = Test::Object::StringOverload->new; my %refh; -if (!$ENV{PERL_CORE_MINITEST}) { +unless (is_miniperl()) { + require Tie::RefHash; tie %refh, 'Tie::RefHash'; $refh{$ov_obj} = 1; } @@ -92,10 +92,9 @@ while (<DATA>) { if ($note =~ /NOWARNINGS/) { $res = eval "no warnings; $tstr"; } - elsif ($note =~ /MINISKIP/ && $ENV{PERL_CORE_MINITEST}) { - skip("Doesn't work with miniperl", $yn =~ /=/ ? 2 : 1); - } else { + skip_if_miniperl("Doesn't work with miniperl", $yn =~ /=/ ? 2 : 1) + if $note =~ /MINISKIP/; $res = eval $tstr; } diff --git a/t/op/write.t b/t/op/write.t index b5c2210309..b19db71004 100644 --- a/t/op/write.t +++ b/t/op/write.t @@ -610,10 +610,8 @@ close STDOUT_DUP; *CmT = *{$::{Comment}}{FORMAT}; ok defined *{$::{CmT}}{FORMAT}, "glob assign"; -if ($ENV{PERL_CORE_MINITEST}) { - ok 1, "Skip test for miniperl, as it does not support scalario"; -} -else { +SKIP: { + skip_if_miniperl('miniperl does not support scalario'); my $buf = ""; open my $fh, ">", \$buf; my $old_fh = select $fh; |