Cleaning up the Time::gmtime and Time::localtime tests and make them go past 2038.
[p5sagit/p5-mst-13.2.git] / lib / Time / gmtime.t
1 #!./perl
2
3 BEGIN {
4     chdir 't' if -d 't';
5     @INC = '../lib';
6
7     require "./test.pl";
8 }
9
10 BEGIN { plan tests => 37; }
11
12 BEGIN { use_ok Time::gmtime; }
13
14 for my $time (0, 2**31-1, 2**33, time) {
15     my $gmtime = gmtime $time;          # This is the OO gmtime.
16     my @gmtime = CORE::gmtime $time;    # This is the gmtime function
17
18     for my $method (qw(sec min hour mday mon year wday yday isdst)) {
19         is $gmtime->$method, shift @gmtime, "gmtime($time)->$method";
20     }
21 }