Change 33765 by [EMAIL PROTECTED] on 2008/04/30 07:47:07

        Subject: [PATCH] extra tests for t/op/sprintf2.t (was Re: [perl #45383] 
RE:
        From: Bram <[EMAIL PROTECTED]>
        Date: Tue, 29 Apr 2008 22:27:21 +0200
        Message-ID: <[EMAIL PROTECTED]>

Affected files ...

... //depot/perl/t/op/sprintf2.t#11 edit

Differences ...

==== //depot/perl/t/op/sprintf2.t#11 (text) ====
Index: perl/t/op/sprintf2.t
--- perl/t/op/sprintf2.t#10~29025~      2006-10-16 02:26:17.000000000 -0700
+++ perl/t/op/sprintf2.t        2008-04-30 00:47:07.000000000 -0700
@@ -6,7 +6,7 @@
     require './test.pl';
 }   
 
-plan tests => 1292;
+plan tests => 1295;
 
 is(
     sprintf("%.40g ",0.01),
@@ -134,3 +134,8 @@
     }
 }
 
+# test that %f doesn't panic with +Inf, -Inf, NaN [perl #45383]
+foreach my $n (2**1e100, -2**1e100, 2**1e100/2**1e100) { # +Inf, -Inf, NaN
+    eval { my $f = sprintf("%f", $n); };
+    is $@, "", "sprintf(\"%f\", $n)";
+}
End of Patch.

Reply via email to