Debian Codegraph @

t/date.holiday.0.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 $obj = new Date::Manip::Date;
10 $obj->config("forcedate","now,America/New_York");
11 $obj->config("ConfigFile","Manip.cnf");
12
13 sub test {
14 my(@test)=@_;
15 my($date) = shift(@test);
16 $obj->set("date",$date);
17 return $obj->holiday();
18 }
19
20 my $tests=qq{
21
22 [ 2009 08 01 12 00 00 ] => __undef__
23
24 [ 2009 08 03 03 00 00 ] => __undef__
25
26 [ 2009 08 03 12 00 00 ] => __undef__
27
28 [ 2009 07 04 00 00 00 ] => __undef__
29
30 [ 2009 07 03 00 00 00 ] => 'Independence Day'
31
32 [ 2009 11 26 00 00 00 ] => Thanksgiving
33
34 [ 2009 11 27 00 00 00 ] => __blank__
35
36 [ 1999 06 02 00 00 00 ] => 'A special test holiday for 1999'
37
38 [ 1999 12 31 00 00 00 ] => "New Year's Day"
39
40 [ 2000 01 01 00 00 00 ] => __undef__
41
42 [ 2001 01 01 00 00 00 ] => "New Year's Day"
43
44 };
45
46 $::ti->tests(func => \&test,
47 tests => $tests);
48 $::ti->done_testing();
49
50 #Local Variables:
51 #mode: cperl
52 #indent-tabs-mode: nil
53 #cperl-indent-level: 3
54 #cperl-continued-statement-offset: 2
55 #cperl-continued-brace-offset: 0
56 #cperl-brace-offset: 0
57 #cperl-brace-imaginary-offset: 0
58 #cperl-label-offset: 0
59 #End: