X-Git-Url: https://perl5.git.perl.org/perl5.git/blobdiff_plain/415b66b2c58add39fa4cb119f7eafa5164f33298..25a8018cf5dd232ceec2e9edcbd1d0a472a3bccd:/t/op/infnan.t diff --git a/t/op/infnan.t b/t/op/infnan.t index 00087eb..bb03fd4 100644 --- a/t/op/infnan.t +++ b/t/op/infnan.t @@ -399,6 +399,14 @@ ok(!($NaN > $NInf), "NaN is not gt -Inf"); is(sin($PInf), $NaN, "sin(+Inf) is NaN"); +{ + eval 'for my $x (0..$NaN) { last }'; + like($@, qr/Range iterator outside integer range/, "0..NaN fails"); + + eval 'for my $x ($NaN..0) { last }'; + like($@, qr/Range iterator outside integer range/, "NaN..0 fails"); +} + # === Overflows and Underflows === # 1e9999 (and 1e-9999) are large (and small) enough for even