File: dm5.recur_1.t

package info (click to toggle)
libdate-manip-perl 6.83-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 16,264 kB
  • sloc: perl: 245,655; sh: 54; makefile: 11
file content (99 lines) | stat: -rwxr-xr-x 1,709 bytes parent folder | download | duplicates (3)
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
#!/usr/bin/perl

use warnings;
use strict;
use Test::Inter;
$::ti = new Test::Inter $0;
require "tests-dm5.pl";

Date_Init("TZ=EST");

my $tests ="

'every 7th day in June 1999'
0
1999061500:00:00
1999063000:00:00
   =>
   1999062100:00:00
   1999062800:00:00

'every 7th day in June 1999'
1999061500:00:00
1999061500:00:00
1999063000:00:00
   =>
   1999061500:00:00
   1999062200:00:00
   1999062900:00:00

'every 7th day in June 1999'
   =>
   1999060700:00:00
   1999061400:00:00
   1999062100:00:00
   1999062800:00:00

'4th day of each month in 1999'
   =>
   1999010400:00:00
   1999020400:00:00
   1999030400:00:00
   1999040400:00:00
   1999050400:00:00
   1999060400:00:00
   1999070400:00:00
   1999080400:00:00
   1999090400:00:00
   1999100400:00:00
   1999110400:00:00
   1999120400:00:00

'2nd tuesday of every month in 1999'
   =>
   1999011200:00:00
   1999020900:00:00
   1999030900:00:00
   1999041300:00:00
   1999051100:00:00
   1999060800:00:00
   1999071300:00:00
   1999081000:00:00
   1999091400:00:00
   1999101200:00:00
   1999110900:00:00
   1999121400:00:00

'every 2nd tuesday in June 1999'
   =>
   1999060100:00:00
   1999061500:00:00
   1999062900:00:00

'every 6th tuesday in 1999'
   =>
   1999020900:00:00
   1999032300:00:00
   1999050400:00:00
   1999061500:00:00
   1999072700:00:00
   1999090700:00:00
   1999101900:00:00
   1999113000:00:00

";

$::ti->tests(func  => \&ParseRecur,
             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: