diff options
author | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2007-01-24 11:02:24 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2007-01-24 11:02:24 +0000 |
commit | 99ffb1cb9ad68572b442d79446caa8bcbb2964fc (patch) | |
tree | 9310ccfea3e650f85b192cc81419999d341a1a60 /lib/Time/Local.t | |
parent | 28e491ba9090286e45cbf77736b31eecb771fe4e (diff) | |
download | perl-99ffb1cb9ad68572b442d79446caa8bcbb2964fc.tar.gz |
Upgrade to Time::Local 1.16
p4raw-id: //depot/perl@29940
Diffstat (limited to 'lib/Time/Local.t')
-rwxr-xr-x | lib/Time/Local.t | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/lib/Time/Local.t b/lib/Time/Local.t index 4ae739227b..bba67963fc 100755 --- a/lib/Time/Local.t +++ b/lib/Time/Local.t @@ -77,7 +77,7 @@ my $tests = (@time * 12); $tests += @neg_time * 12; $tests += @bad_time; $tests += @years; -$tests += 5; +$tests += 10; $tests += 2 if $ENV{PERL_CORE}; $tests += 8 if $ENV{MAINTAINER}; @@ -171,8 +171,25 @@ SKIP: skip 'this platform does not support negative epochs.', 1 unless $neg_epoch_ok; + eval { timegm(0,0,0,29,1,1900) }; + like($@, qr/Day '29' out of range 1\.\.28/, + 'does not accept leap day in 1900'); + + eval { timegm(0,0,0,29,1,200) }; + like($@, qr/Day '29' out of range 1\.\.28/, + 'does not accept leap day in 2100 (year passed as 200)'); + + eval { timegm(0,0,0,29,1,0) }; + is($@, '', 'no error with leap day of 2000 (year passed as 0)'); + eval { timegm(0,0,0,29,1,1904) }; is($@, '', 'no error with leap day of 1904'); + + eval { timegm(0,0,0,29,1,4) }; + is($@, '', 'no error with leap day of 2004 (year passed as 4)'); + + eval { timegm(0,0,0,29,1,96) }; + is($@, '', 'no error with leap day of 1996 (year passed as 96)'); } if ($ENV{MAINTAINER}) { |