Debian Codegraph @

t/base.calc_date_delta.t

raw symbols SCIP
1 #!/usr/bin/perl
2
3 use warnings;
4 use strict;
5 use Test::Inter;
6 $::ti = new Test::Inter $0;
7 require "tests.pl";
8
9 our $dmt = new Date::Manip::TZ;
10 our $obj = $dmt->base();
11 $dmt->config("forcedate","now,America/New_York");
12
13 sub test {
14 my(@test)=@_;
15 my @ret = $obj->calc_date_delta(@test);
16 return @ret;
17 }
18
19 my $tests="
20
21 [ 2009 08 15 12 00 00 ] [ 0 0 0 5 1 0 0 ] 0 => [ 2009 8 20 13 0 0 ]
22
23 [ 2009 08 15 12 00 00 ] [ 0 0 0 5 1 0 0 ] 1 => [ 2009 8 10 11 0 0 ]
24
25 [ 2009 08 15 12 00 00 ] [ 0 0 1 5 1 0 0 ] 0 => [ 2009 8 27 13 0 0 ]
26
27 [ 2009 08 15 12 00 00 ] [ 0 0 1 5 1 0 0 ] 1 => [ 2009 8 3 11 0 0 ]
28
29 [ 2009 08 15 12 00 00 ] [ 0 3 1 5 1 0 0 ] 0 => [ 2009 11 27 13 0 0 ]
30
31 [ 2009 08 15 12 00 00 ] [ 0 3 1 5 1 0 0 ] 1 => [ 2009 5 3 11 0 0 ]
32
33 [ 2009 08 15 12 00 00 ] [ 2 3 1 5 1 0 0 ] 0 => [ 2011 11 27 13 0 0 ]
34
35 [ 2009 08 15 12 00 00 ] [ 2 3 1 5 1 0 0 ] 1 => [ 2007 5 3 11 0 0 ]
36
37 ";
38
39 $::ti->tests(func => \&test,
40 tests => $tests);
41 $::ti->done_testing();
42
43 #Local Variables:
44 #mode: cperl
45 #indent-tabs-mode: nil
46 #cperl-indent-level: 3
47 #cperl-continued-statement-offset: 2
48 #cperl-continued-brace-offset: 0
49 #cperl-brace-offset: 0
50 #cperl-brace-imaginary-offset: 0
51 #cperl-label-offset: 0
52 #End: