Debian Codegraph @

t/date.prev.t

raw symbols SCIP
1 #!/usr/bin/perl
2
3 use warningsscip-perl cpan Date-Manip 6.99 warnings/;
4 use strictscip-perl cpan Date-Manip 6.99 strict/;
5 use Test::Interscip-perl cpan Date-Manip 6.99 Test/Inter/;
6 $::tiscip-perl cpan Date-Manip 6.99 main/`$::ti`. = new Test::Inter $0scip-perl cpan Date-Manip 6.99 main/$0.;
7 requirescip-perl cpan Date-Manip 6.99 main/require(). "tests.pl";
8
9 our $objscip-perl cpan Date-Manip 6.99 main/$obj. = new Date::Manip::Date;
10 $objscip-perl cpan Date-Manip 6.99 main/$obj.->configscip-perl cpan Date-Manip 6.99 main/config().("forcedate","now,America/New_York");
11
12 sub testscip-perl cpan Date-Manip 6.99 main/test(). {
13 my(@test)=@_scip-perl cpan Date-Manip 6.99 main/`@_`.;
14 my $date = shiftscip-perl cpan Date-Manip 6.99 main/shift().(@test);
15 $objscip-perl cpan Date-Manip 6.99 main/$obj.->setscip-perl cpan Date-Manip 6.99 main/set().("date",$date);
16 my $err = $objscip-perl cpan Date-Manip 6.99 main/$obj.->prevscip-perl cpan Date-Manip 6.99 main/prev().(@test);
17 if ($err) {
18 return $objscip-perl cpan Date-Manip 6.99 main/$obj.->errscip-perl cpan Date-Manip 6.99 main/err().();
19 } else {
20 return [ $objscip-perl cpan Date-Manip 6.99 main/$obj.->valuescip-perl cpan Date-Manip 6.99 main/value().() ];
21 }
22 }
23
24 my $tests="
25
26 [ 1996 11 22 17 49 30 ] 4 0 => [ 1996 11 21 17 49 30 ]
27
28 [ 1996 11 22 17 49 30 ] 4 1 => [ 1996 11 21 17 49 30 ]
29
30 [ 1996 11 22 17 49 30 ] 5 0 => [ 1996 11 15 17 49 30 ]
31
32 [ 1996 11 22 17 49 30 ] 5 0 => [ 1996 11 15 17 49 30 ]
33
34 [ 1996 11 22 17 49 30 ] 5 1 => [ 1996 11 22 17 49 30 ]
35
36 [ 1996 11 22 17 49 30 ] 5 0 [ 18 30 ] => [ 1996 11 15 18 30 0 ]
37
38 [ 1996 11 22 17 49 30 ] 5 0 [ 18 30 45 ] => [ 1996 11 15 18 30 45 ]
39
40 [ 1996 11 22 17 49 30 ] 5 1 [ 18 30 45 ] => [ 1996 11 22 18 30 45 ]
41
42 [ 1996 11 22 17 49 30 ] 5 2 [ 18 30 45 ] => [ 1996 11 15 18 30 45 ]
43
44 [ 1996 11 22 17 49 30 ] __undef__ 0 [ 18 0 0 ] => [ 1996 11 21 18 0 0 ]
45
46 [ 1996 11 22 17 49 33 ] __undef__ 0 [ 18 30 0 ] => [ 1996 11 21 18 30 0 ]
47
48 [ 1996 11 22 17 49 33 ] __undef__ 0 [ 18 30 45 ] => [ 1996 11 21 18 30 45 ]
49
50 [ 1996 11 22 17 49 33 ] __undef__ 0 [ 18 __undef__ 45 ] => [ 1996 11 21 18 0 45 ]
51
52 [ 1996 11 22 17 0 0 ] __undef__ 0 [ 17 0 0 ] => [ 1996 11 21 17 0 0 ]
53
54 [ 1996 11 22 17 0 0 ] __undef__ 1 [ 17 0 0 ] => [ 1996 11 22 17 0 0 ]
55
56 [ 1996 11 22 17 49 0 ] __undef__ 0 [ 17 49 0 ] => [ 1996 11 21 17 49 0 ]
57
58 [ 1996 11 22 17 49 0 ] __undef__ 1 [ 17 49 0 ] => [ 1996 11 22 17 49 0 ]
59
60 [ 1996 11 22 17 49 33 ] __undef__ 0 [ 17 49 33 ] => [ 1996 11 21 17 49 33 ]
61
62 [ 1996 11 22 17 49 33 ] __undef__ 1 [ 17 49 33 ] => [ 1996 11 22 17 49 33 ]
63
64 [ 1996 11 22 17 0 33 ] __undef__ 0 [ 17 __undef__ 33 ] => [ 1996 11 21 17 0 33 ]
65
66 [ 1996 11 22 17 0 33 ] __undef__ 1 [ 17 __undef__ 33 ] => [ 1996 11 22 17 0 33 ]
67
68 [ 1996 11 22 17 49 30 ] __undef__ 0 [ __undef__ 30 0 ] => [ 1996 11 22 17 30 0 ]
69
70 [ 1996 11 22 17 49 30 ] __undef__ 0 [ __undef__ 30 45 ] => [ 1996 11 22 17 30 45 ]
71
72 [ 1996 11 22 17 49 30 ] __undef__ 0 [ __undef__ __undef__ 30 ] => [ 1996 11 22 17 48 30 ]
73
74 [ 1996 11 22 17 30 0 ] __undef__ 0 [ __undef__ 30 0 ] => [ 1996 11 22 16 30 0 ]
75
76 [ 1996 11 22 17 30 0 ] __undef__ 1 [ __undef__ 30 0 ] => [ 1996 11 22 17 30 0 ]
77
78 [ 1996 11 22 17 30 45 ] __undef__ 0 [ __undef__ 30 45 ] => [ 1996 11 22 16 30 45 ]
79
80 [ 1996 11 22 17 30 45 ] __undef__ 1 [ __undef__ 30 45 ] => [ 1996 11 22 17 30 45 ]
81
82 [ 1996 11 22 17 30 45 ] __undef__ 0 [ __undef__ __undef__ 45 ] => [ 1996 11 22 17 29 45 ]
83
84 [ 1996 11 22 17 30 45 ] __undef__ 1 [ __undef__ __undef__ 45 ] => [ 1996 11 22 17 30 45 ]
85
86 [ 2002 11 22 18 15 0 ] 4 0 => [ 2002 11 21 18 15 0 ]
87
88 [ 2002 11 22 18 15 0 ] 4 0 [ 12 30 ] => [ 2002 11 21 12 30 0 ]
89
90 [ 2002 11 22 18 15 0 ] 5 0 => [ 2002 11 15 18 15 0 ]
91
92 [ 2002 11 22 18 15 0 ] 5 1 => [ 2002 11 22 18 15 0 ]
93
94 [ 2002 11 22 18 15 0 ] 5 2 => [ 2002 11 15 18 15 0 ]
95
96 [ 2002 11 22 18 15 0 ] 5 0 [ 12 30 ] => [ 2002 11 15 12 30 0 ]
97
98 [ 2002 11 22 18 15 0 ] 5 1 [ 12 30 ] => [ 2002 11 22 12 30 0 ]
99
100 [ 2002 11 22 18 15 0 ] 5 2 [ 12 30 ] => [ 2002 11 22 12 30 0 ]
101
102 [ 2002 11 22 18 15 0 ] 5 0 [ 19 30 ] => [ 2002 11 15 19 30 0 ]
103
104 [ 2002 11 22 18 15 0 ] 5 1 [ 19 30 ] => [ 2002 11 22 19 30 0 ]
105
106 [ 2002 11 22 18 15 0 ] 5 2 [ 19 30 ] => [ 2002 11 15 19 30 0 ]
107
108 ";
109
110 $::tiscip-perl cpan Date-Manip 6.99 main/`$::ti`.->testsscip-perl cpan Date-Manip 6.99 main/tests().(func => \&testscip-perl cpan Date-Manip 6.99 main/test().,
111 tests => $tests);
112 $::tiscip-perl cpan Date-Manip 6.99 main/`$::ti`.->done_testingscip-perl cpan Date-Manip 6.99 main/done_testing().();
113
114 #Local Variables:
115 #mode: cperl
116 #indent-tabs-mode: nil
117 #cperl-indent-level: 3
118 #cperl-continued-statement-offset: 2
119 #cperl-continued-brace-offset: 0
120 #cperl-brace-offset: 0
121 #cperl-brace-imaginary-offset: 0
122 #cperl-label-offset: 0
123 #End: