File: dm5.delta_format.t

package info (click to toggle)
libdate-manip-perl 6.98-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 14,928 kB
  • sloc: perl: 222,846; sh: 54; ansic: 26; makefile: 8
file content (80 lines) | stat: -rwxr-xr-x 1,249 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
#!/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="

1:2:3:4:5:6:7
4
'%yv %Mv %wv %dv %hv %mv %sv'
=>
'1 2 3 4 5 6 7'

1:2:3:4:5:6:7
4
'%yd %Md %wd %dd %hd %md %sd'
=>
'1.1667 2.0000 3.6018 4.2126 5.1019 6.1167 7.0000'

1:2:3:4:5:6:7
0
'%yh %Mh %wh %dh %hh %mh %sh'
=>
'1 14 3 25 605 36306 2178367'

1:2:3:4:5:6:7
4
'%yt %Mt %wt %dt %ht %mt %st'
=>
'1.1667 14.0000 3.6018 25.2126 605.1019 36306.1167 2178367.0000'

1:2:3:4:5:6:7
approx
4
'%yv %Mv %wv %dv %hv %mv %sv'
=>
'1 2 3 4 5 6 7'

1:2:3:4:5:6:7
approx
4
'%yd %Md %wd %dd %hd %md %sd'
=>
'1.2357 2.8283 3.6018 4.2126 5.1019 6.1167 7.0000'

1:2:3:4:5:6:7
approx
4
'%yh %Mh %wh %dh %hh %mh %sh'
=>
'1 14 63.875 451.125 10832 649926 38995567'

1:2:3:4:5:6:7
approx
4
'%yt %Mt %wt %dt %ht %mt %st'
=>
'1.2357 14.8283 64.4768 451.3376 10832.1019 649926.1167 38995567.0000'

";

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