In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/aa3ecafd01033b5ee5566f754a882d417a39e0ad?hp=80c1439ffbd799a82c109d650c32e9ecc7a3eb26>

- Log -----------------------------------------------------------------
commit aa3ecafd01033b5ee5566f754a882d417a39e0ad
Author: Jarkko Hietaniemi <[email protected]>
Date:   Sat Nov 5 14:10:56 2016 -0400

    netbsd-vax: no infinity
    
    The tests were not failing, but being a bit noisy.
-----------------------------------------------------------------------

Summary of changes:
 t/op/tie_fetch_count.t | 25 ++++++++++++++++++++++---
 1 file changed, 22 insertions(+), 3 deletions(-)

diff --git a/t/op/tie_fetch_count.t b/t/op/tie_fetch_count.t
index 57e7aca..8adfa4a 100644
--- a/t/op/tie_fetch_count.t
+++ b/t/op/tie_fetch_count.t
@@ -14,6 +14,8 @@ plan (tests => 345);
 use strict;
 use warnings;
 
+my $can_config = eval { require Config; 1 };
+
 my $count = 0;
 
 # Usage:
@@ -117,8 +119,16 @@ $dummy  =   abs $var    ; check_count 'abs';
 $dummy  =   log $var    ; check_count 'log';
 $dummy  =  sqrt $var    ; check_count 'sqrt';
 $dummy  =   int $var    ; check_count 'int';
+SKIP: {
+    unless ($can_config) {
+        skip "no config (no infinity for int)", 1;
+    }
+    unless ($Config::Config{d_double_has_inf}) {
+        skip "no infinity for int", 1;
+    }
 $var = "inf" for 1..5;
 $dummy  =   int $var    ; check_count 'int $tied_inf';
+}
 $dummy  = atan2 $var, 1 ; check_count 'atan2';
 
 # Readline/glob
@@ -243,7 +253,6 @@ for 
([chdir=>''],[chmod=>'0,'],[chown=>'0,0,'],[utime=>'0,0,'],
     check_count "$op $args\\\$tied_glob$postargs";
 }
 
-my $can_config = eval { require Config; 1 };
 SKIP:
 {
     skip "No Config", 4 unless $can_config;
@@ -286,15 +295,25 @@ pos$var = 0             ; check_count 'lvalue pos $utf8';
 $dummy=sprintf"%1s",$var; check_count 'sprintf "%1s", $utf8';
 $dummy=sprintf"%.1s",$var; check_count 'sprintf "%.1s", $utf8';
 
+my @fmt = qw(B b c D d i O o p u U X x);
+
 tie $var, "main", 23;
-for (qw(B b c D d i O o p u U X x)) {
+for (@fmt) {
     $dummy=sprintf"%$_",$var; check_count "sprintf '%$_'"
 }
+SKIP: {
+unless ($can_config) {
+    skip "no Config (no infinity for sprintf @fmt)", scalar @fmt;
+}
+unless ($Config::Config{d_double_has_inf}) {
+    skip "no infinity for sprintf @fmt", scalar @fmt;
+}
 tie $var, "main", "Inf";
-for (qw(B b c D d i O o p u U X x)) {
+for (@fmt) {
     $dummy = eval { sprintf "%$_", $var };
                               check_count "sprintf '%$_', \$tied_inf"
 }
+}
 
 tie $var, "main", "\x{100}";
 $dummy  = substr$var,0,1; check_count 'substr $utf8';

--
Perl5 Master Repository

Reply via email to