Debian Codegraph @

t/date.week_of_year.0.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($date,$first) = @_scip-perl cpan Date-Manip 6.99 main/`@_`.;
14 $objscip-perl cpan Date-Manip 6.99 main/$obj.->setscip-perl cpan Date-Manip 6.99 main/set().("date",$date);
15 return $objscip-perl cpan Date-Manip 6.99 main/$obj.->week_of_yearscip-perl cpan Date-Manip 6.99 main/week_of_year().($first);
16 }
17
18 my $tests="
19
20 # Date, FirstDate
21
22 [ 2008 01 01 00 00 00 ] 7 => 1
23
24 [ 2008 01 06 00 00 00 ] 7 => 2
25
26 [ 2008 12 23 00 00 00 ] 7 => 52
27
28 [ 2008 12 28 00 00 00 ] 7 => 53
29
30 [ 2008 01 01 00 00 00 ] 1 => 1
31
32 [ 2008 01 06 00 00 00 ] 1 => 1
33
34 [ 2008 12 23 00 00 00 ] 1 => 52
35
36 [ 2008 12 28 00 00 00 ] 1 => 52
37
38 [ 2008 12 29 00 00 00 ] 1 => 53
39
40 [ 2005 01 01 00 00 00 ] 7 => 0
41
42 [ 2005 01 06 00 00 00 ] 7 => 1
43
44 [ 2005 12 23 00 00 00 ] 7 => 51
45
46 [ 2005 12 28 00 00 00 ] 7 => 52
47
48 [ 2005 01 01 00 00 00 ] 1 => 0
49
50 [ 2005 01 06 00 00 00 ] 1 => 1
51
52 [ 2005 12 23 00 00 00 ] 1 => 51
53
54 [ 2005 12 28 00 00 00 ] 1 => 52
55
56 [ 2005 12 29 00 00 00 ] 1 => 52
57
58 ";
59
60 $::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().,
61 tests => $tests);
62 $::tiscip-perl cpan Date-Manip 6.99 main/`$::ti`.->done_testingscip-perl cpan Date-Manip 6.99 main/done_testing().();
63
64 #Local Variables:
65 #mode: cperl
66 #indent-tabs-mode: nil
67 #cperl-indent-level: 3
68 #cperl-continued-statement-offset: 2
69 #cperl-continued-brace-offset: 0
70 #cperl-brace-offset: 0
71 #cperl-brace-imaginary-offset: 0
72 #cperl-label-offset: 0
73 #End: