zeroclickinfo-goodies/t/UnixTime.t

24 lines
675 B
Perl
Raw Normal View History

2012-04-23 20:05:49 -07:00
#!/usr/bin/env perl
use strict;
use warnings;
use Test::More;
use DDG::Test::Goodie;
zci answer_type => 'time_conversion';
2013-11-13 17:55:08 -08:00
zci is_cached => 0;
2012-04-23 20:05:49 -07:00
ddg_goodie_test(
[qw(
DDG::Goodie::UnixTime
)],
'unix time 0000000000000' => test_zci('Unix Time Conversion: Thu Jan 01 00:00:00 1970 +0000'),
'epoch 0' => test_zci('Unix Time Conversion: Thu Jan 01 00:00:00 1970 +0000'),
'epoch 2147483647' => test_zci('Unix Time Conversion: Tue Jan 19 03:14:07 2038 +0000'),
2013-05-13 10:01:55 -07:00
map {
"$_ 0" => test_zci('Unix Time Conversion: Thu Jan 01 00:00:00 1970 +0000'),
}, [ 'unixtime', 'time', 'timestamp', 'datetime', 'epoch', 'unix time', 'unix epoch' ]
2012-04-23 20:05:49 -07:00
);
done_testing;