Blame t/date.secs_since_1970_GMT.0.t
|
Packit |
95306a |
#!/usr/bin/perl -w
|
|
Packit |
95306a |
|
|
Packit |
95306a |
use Test::Inter;
|
|
Packit |
95306a |
$t = new Test::Inter 'date :: secs_since_1970_GMT(secs->date)';
|
|
Packit |
95306a |
$testdir = '';
|
|
Packit |
95306a |
$testdir = $t->testdir();
|
|
Packit |
95306a |
|
|
Packit |
95306a |
use Date::Manip;
|
|
Packit |
95306a |
if (DateManipVersion() >= 6.00) {
|
|
Packit |
95306a |
$t->feature("DM6",1);
|
|
Packit |
95306a |
}
|
|
Packit |
95306a |
|
|
Packit |
95306a |
$t->skip_all('Date::Manip 6.xx required','DM6');
|
|
Packit |
95306a |
|
|
Packit |
95306a |
|
|
Packit |
95306a |
sub test {
|
|
Packit |
95306a |
(@test)=@_;
|
|
Packit |
95306a |
$obj->secs_since_1970_GMT(@test);
|
|
Packit |
95306a |
$ret = $obj->value();
|
|
Packit |
95306a |
return $ret;
|
|
Packit |
95306a |
}
|
|
Packit |
95306a |
|
|
Packit |
95306a |
$obj = new Date::Manip::Date;
|
|
Packit |
95306a |
$obj->config("forcedate","now,America/New_York");
|
|
Packit |
95306a |
|
|
Packit |
95306a |
$tests="
|
|
Packit |
95306a |
881755200 => 1997121007:00:00
|
|
Packit |
95306a |
|
|
Packit |
95306a |
944829030 => 1999121007:30:30
|
|
Packit |
95306a |
|
|
Packit |
95306a |
1256046697 => 2009102009:51:37
|
|
Packit |
95306a |
|
|
Packit |
95306a |
";
|
|
Packit |
95306a |
|
|
Packit |
95306a |
$t->tests(func => \&test,
|
|
Packit |
95306a |
tests => $tests);
|
|
Packit |
95306a |
$t->done_testing();
|
|
Packit |
95306a |
|
|
Packit |
95306a |
#Local Variables:
|
|
Packit |
95306a |
#mode: cperl
|
|
Packit |
95306a |
#indent-tabs-mode: nil
|
|
Packit |
95306a |
#cperl-indent-level: 3
|
|
Packit |
95306a |
#cperl-continued-statement-offset: 2
|
|
Packit |
95306a |
#cperl-continued-brace-offset: 0
|
|
Packit |
95306a |
#cperl-brace-offset: 0
|
|
Packit |
95306a |
#cperl-brace-imaginary-offset: 0
|
|
Packit |
95306a |
#cperl-label-offset: 0
|
|
Packit |
95306a |
#End:
|