Deprecate assignment to $[
[p5sagit/p5-mst-13.2.git] / t / op / time.t
old mode 100755 (executable)
new mode 100644 (file)
index 00c5b05..89ea04b
@@ -6,7 +6,7 @@ BEGIN {
     require './test.pl';
 }
 
-plan tests => 42;
+plan tests => 44;
 
 ($beguser,$begsys) = times;
 
@@ -130,3 +130,17 @@ ok(gmtime() =~ /^(Sun|Mon|Tue|Wed|Thu|Fri|Sat)[ ]
         like scalar localtime($time), $scalar,       "  scalar";
     }
 }
+
+# Test floating point args
+{
+    eval {
+        $SIG{__WARN__} = sub { die @_; };
+        localtime(1.23);
+    };
+    is($@, '', 'Ignore fractional time');
+    eval {
+        $SIG{__WARN__} = sub { die @_; };
+        gmtime(1.23);
+    };
+    is($@, '', 'Ignore fractional time');
+}