1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103
|
#!/usr/bin/perl
use warnings;
use strict;
use Test::Inter;
$::ti = new Test::Inter $0;
require "tests.pl";
$::ti->use_ok('Date::Manip::TZdata');
my $obj;
my $moddir = $::ti->testdir('mod');
if ( -d "$moddir/tzdata" ) {
$obj = new Date::Manip::TZdata($moddir);
} else {
$::ti->skip_all('No tzdata directory');
}
sub test {
my(@test)=@_;
return $obj->_ruleInfo(@test);
}
my $tests="
HK stdlett 1955 => __blank__
HK savlett 1955 => S
Iran stdlett 1980 => __blank__
Iran savlett 1980 => __blank__
Canada stdlett 1980 => S
Canada savlett 1980 => D
Chicago lastoff 1920 => 00:00:00
Winn lastoff 1942 => 01:00:00
US rdates 1918 =>
1918033102:00:00
01:00:00
w
D
1918102702:00:00
00:00:00
w
S
US rdates 1942 =>
1942020902:00:00
01:00:00
w
W
US rdates 1945 =>
1945081423:00:00
01:00:00
u
P
1945093002:00:00
00:00:00
w
S
US rdates 2010 =>
2010031402:00:00
01:00:00
w
D
2010110702:00:00
00:00:00
w
S
RussiaAsia rdates 1990 =>
1990032502:00:00
01:00:00
s
__blank__
1990093002:00:00
00:00:00
s
__blank__
";
$::ti->tests(func => \&test,
tests => $tests);
$::ti->done_testing();
#Local Variables:
#mode: cperl
#indent-tabs-mode: nil
#cperl-indent-level: 3
#cperl-continued-statement-offset: 2
#cperl-continued-brace-offset: 0
#cperl-brace-offset: 0
#cperl-brace-imaginary-offset: 0
#cperl-label-offset: 0
#End:
|