(was Re: Why t/lib/extutils.t is failing ...
[p5sagit/p5-mst-13.2.git] / t / lib / time-piece.t
index 777b25b..c62e36d 100644 (file)
@@ -12,7 +12,7 @@ BEGIN {
     }
 }
 
-print "1..85\n";
+print "1..86\n";
 
 use Time::Piece;
 
@@ -267,12 +267,12 @@ print "ok 74\n";
 
 my @days = $t->weekday_names();
 
-$t->weekday_names(@frdays);
+Time::Piece::weekday_names(@frdays);
 
 print "not " unless $t->weekday eq "Merdi";
 print "ok 75\n";
 
-$t->weekday_names(@days);
+Time::Piece::weekday_names(@days);
 
 print "not " unless $t->weekday eq "Tuesday";
 print "ok 76\n";
@@ -285,12 +285,12 @@ my @dumonths = qw(januari februari maart april mei juni
 print "not " unless $t->month(@dumonths) eq "februari";
 print "ok 77\n";
 
-$t->month_names(@dumonths);
+Time::Piece::month_names(@dumonths);
 
 print "not " unless $t->month eq "februari";
 print "ok 78\n";
 
-$t->mon_names(@months);
+Time::Piece::mon_names(@months);
 
 print "not " unless $t->monname eq "Feb";
 print "ok 79\n";
@@ -314,3 +314,10 @@ print "ok 84\n";
 print "not " unless Time::Piece::_is_leap_year(1904);
 print "ok 85\n";
 
+use Time::Piece 'strptime';
+
+my %T = strptime("%T", "12:34:56");
+
+print "not " unless keys %T == 3 && $T{H} == 12 && $T{M} == 34 && $T{S} == 56;
+print "ok 86\n";
+