diff options
Diffstat (limited to 'cpan/Scalar-List-Utils/t/lln.t')
-rw-r--r-- | cpan/Scalar-List-Utils/t/lln.t | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/cpan/Scalar-List-Utils/t/lln.t b/cpan/Scalar-List-Utils/t/lln.t index df9ea3aea9..be928e462b 100644 --- a/cpan/Scalar-List-Utils/t/lln.t +++ b/cpan/Scalar-List-Utils/t/lln.t @@ -10,9 +10,13 @@ foreach my $num (qw(1 -1 +1 1.0 +1.0 -1.0 -1.0e-12)) { ok(looks_like_number($num), "'$num'"); } -is(!!looks_like_number("Inf"), $] >= 5.006001, 'Inf'); -is(!!looks_like_number("Infinity"), $] >= 5.008, 'Infinity'); -is(!!looks_like_number("NaN"), $] >= 5.008, 'NaN'); +SKIP: { + my $vax_float = (pack("d",1) =~ /^[\x80\x10]\x40/); + skip("VAX does not have inf/nan", 3) if $vax_float; + is(!!looks_like_number("Inf"), $] >= 5.006001, 'Inf'); + is(!!looks_like_number("Infinity"), $] >= 5.008, 'Infinity'); + is(!!looks_like_number("NaN"), $] >= 5.008, 'NaN'); +} is(!!looks_like_number("foo"), '', 'foo'); is(!!looks_like_number(undef), '', 'undef'); is(!!looks_like_number({}), '', 'HASH Ref'); |