This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Explicitly test x infnan producing empty string.
authorJarkko Hietaniemi <jhi@iki.fi>
Mon, 12 Jan 2015 03:18:00 +0000 (22:18 -0500)
committerJarkko Hietaniemi <jhi@iki.fi>
Mon, 12 Jan 2015 11:45:12 +0000 (06:45 -0500)
t/op/infnan.t

index 86135a0..7627135 100644 (file)
@@ -241,6 +241,13 @@ SKIP: {
     }
 }
 
+{
+    # Silence "Non-finite repeat count", that is tested elsewhere.
+    local $^W = 0;
+    is("a" x $PInf, "", "x +Inf");
+    is("a" x $NInf, "", "x -Inf");
+}
+
 # === NaN ===
 
 cmp_ok($NaN, '!=', $NaN, "NaN is NaN numerically (by not being NaN)");
@@ -358,6 +365,12 @@ SKIP: {
     }
 }
 
+{
+    # Silence "Non-finite repeat count", that is tested elsewhere.
+    local $^W = 0;
+    is("a" x $NaN, "", "x NaN");
+}
+
 # === Tests combining Inf and NaN ===
 
 # is() okay with $NaN because it uses eq.