In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/453466ce2f09167e70fd58c95be801ad111eabe5?hp=dd249ef42f37ee26bdcfb8111778f0607302e877>

- Log -----------------------------------------------------------------
commit 453466ce2f09167e70fd58c95be801ad111eabe5
Author: Nicholas Clark <[email protected]>
Date:   Mon Mar 7 22:08:05 2011 +0000

    Move the test for 078c425b721ea35d from fresh_perl.t to pat_rt_report.t
    
    It happens to be the only test in fresh_perl.t that skips on miniperl.
    pat_rt_report.t automatically skips on miniperl, and isn't exclusively for
    bugs reported via RT.

M       t/re/pat_rt_report.t
M       t/run/fresh_perl.t

commit d3d1232e4b14141281f4266718249fa2750cd14e
Author: Nicholas Clark <[email protected]>
Date:   Mon Mar 7 21:55:36 2011 +0000

    Refactor 4 tests to use skip_if_miniperl().

M       t/io/open.t
M       t/op/magic.t
M       t/op/smartmatch.t
M       t/op/write.t

commit b93d0e6249447a8bdcbd59208d8e8138756bae7c
Author: Nicholas Clark <[email protected]>
Date:   Mon Mar 7 21:54:40 2011 +0000

    Refactor sigdispatch.t to use is_miniperl() instead testing %ENV for 
minitest.

M       t/op/sigdispatch.t
-----------------------------------------------------------------------

Summary of changes:
 t/io/open.t          |    3 +--
 t/op/magic.t         |    5 ++---
 t/op/sigdispatch.t   |    3 ++-
 t/op/smartmatch.t    |    9 ++++-----
 t/op/write.t         |    6 ++----
 t/re/pat_rt_report.t |   19 +++++++++++++++++--
 t/run/fresh_perl.t   |   17 -----------------
 7 files changed, 28 insertions(+), 34 deletions(-)

diff --git a/t/io/open.t b/t/io/open.t
index 347bdc0..57412eb 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 403cba7..a8247c0 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/sigdispatch.t b/t/op/sigdispatch.t
index 3d92a39..75bc417 100644
--- a/t/op/sigdispatch.t
+++ b/t/op/sigdispatch.t
@@ -39,7 +39,8 @@ eval {
 is($@, "Alarm!\n", 'after the second loop');
 
 SKIP: {
-    skip('We can\'t test blocking without sigprocmask', 11) if 
$ENV{PERL_CORE_MINITEST} || !$Config{d_sigprocmask};
+    skip('We can\'t test blocking without sigprocmask', 11)
+       if is_miniperl() || !$Config{d_sigprocmask};
 
     require POSIX;
     my $new = POSIX::SigSet->new(&POSIX::SIGUSR1);
diff --git a/t/op/smartmatch.t b/t/op/smartmatch.t
index f14e91c..da4840e 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 b5c2210..b19db71 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;
diff --git a/t/re/pat_rt_report.t b/t/re/pat_rt_report.t
index c0a0ec7..7a03e64 100644
--- a/t/re/pat_rt_report.t
+++ b/t/re/pat_rt_report.t
@@ -7,7 +7,7 @@
 use strict;
 use warnings;
 use 5.010;
-
+use Config;
 
 sub run_tests;
 
@@ -22,7 +22,7 @@ BEGIN {
 }
 
 
-plan tests => 2520;  # Update this when adding/deleting tests.
+plan tests => 2521;  # Update this when adding/deleting tests.
 
 run_tests() unless caller;
 
@@ -1121,6 +1121,21 @@ sub run_tests {
         ok("\x{ff08}." =~ m/[\N{FULLWIDTH LEFT PARENTHESIS}]./ && $& eq 
"\x{ff08}.", $message);
     }
 
+SKIP: {
+    ######## "Segfault using HTML::Entities", Richard Jolly 
<[email protected]>, <[email protected]> in 
[email protected]
+
+    skip('Perl configured without Encode module', 1)
+       unless $Config{extensions} =~ / Encode /;
+
+    # Test case cut down by jhi
+    fresh_perl_like(<<'EOP', qr!Malformed UTF-8 character \(unexpected end of 
string\) in substitution \(s///\) at!, 'Segfault using HTML::Entities');
+use Encode;
+my $t = ord('A') == 193 ? "\xEA" : "\xE9";
+Encode::_utf8_on($t);
+$t =~ s/([^a])//ge;
+EOP
+    }
+
 } # End of sub run_tests
 
 1;
diff --git a/t/run/fresh_perl.t b/t/run/fresh_perl.t
index 17cb082..a3874d9 100644
--- a/t/run/fresh_perl.t
+++ b/t/run/fresh_perl.t
@@ -804,23 +804,6 @@ print glob(q(./"TEST"));
 EXPECT
 ./"TEST"
 ./"TEST"
-######## "Segfault using HTML::Entities", Richard Jolly 
<[email protected]>, <[email protected]> in 
[email protected]
--lw
-# SKIP: use Config; $ENV{PERL_CORE_MINITEST} or " 
$Config::Config{'extensions'} " !~ m[ Encode ] # Perl configured without Encode 
module
-BEGIN {
-  eval 'require Encode';
-  if ($@) { exit 0 } # running minitest?
-}
-# Test case cut down by jhi
-$SIG{__WARN__} = sub { $@ = shift };
-use Encode;
-my $t = ord('A') == 193 ? "\xEA" : "\xE9";
-Encode::_utf8_on($t);
-$t =~ s/([^a])//ge;
-$@ =~ s/ at .*/ at/;
-print $@
-EXPECT
-Malformed UTF-8 character (unexpected end of string) in substitution (s///) at
 ######## "#75146: 27e904532594b7fb (fix for #23810) introduces a #regression"
 use strict;
 

--
Perl5 Master Repository

Reply via email to