In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/43eb98159eec9ba37935203e5bf9f3a4199380c5?hp=5a7ebd3db929011f81e96ab8b34e2cc2ac7730fa>

- Log -----------------------------------------------------------------
commit 43eb98159eec9ba37935203e5bf9f3a4199380c5
Author: Jerry D. Hedden <[email protected]>
Date:   Fri Mar 13 09:37:24 2009 -0400

    Tests for floating point args to localtime and gmtime
-----------------------------------------------------------------------

Summary of changes:
 t/op/time.t |   16 +++++++++++++++-
 1 files changed, 15 insertions(+), 1 deletions(-)
 mode change 100755 => 100644 t/op/time.t

diff --git a/t/op/time.t b/t/op/time.t
old mode 100755
new mode 100644
index 00c5b05..89ea04b
--- a/t/op/time.t
+++ b/t/op/time.t
@@ -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');
+}

--
Perl5 Master Repository

Reply via email to