summaryrefslogtreecommitdiff
path: root/cpan/Scalar-List-Utils
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2016-10-22 08:38:56 -0400
committerJarkko Hietaniemi <jhi@iki.fi>2016-10-22 15:51:17 -0400
commit5b15f36c4b1c5025dccabeef937495997e37e512 (patch)
tree6a979e6e5cb007d57afea692724bcdd48e2f1fe5 /cpan/Scalar-List-Utils
parent8fdb0ccb70ac5e38e98894789de8aaff6d574656 (diff)
downloadperl-5b15f36c4b1c5025dccabeef937495997e37e512.tar.gz
Scalar-List-Utils: netbsd-vax: no inf/nan
Diffstat (limited to 'cpan/Scalar-List-Utils')
-rw-r--r--cpan/Scalar-List-Utils/t/lln.t10
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');