[go: up one dir, main page]

File: f003.t

package info (click to toggle)
libdate-calc-perl 6.3-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 1,272 kB
  • ctags: 339
  • sloc: perl: 14,844; makefile: 2
file content (31 lines) | stat: -rw-r--r-- 914 bytes parent folder | download | duplicates (5)
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
#!perl -w

BEGIN { eval { require bytes; }; }
use strict;
no strict "vars";

BEGIN { $Date::Calc::XS_DISABLE = $Date::Calc::XS_DISABLE = 1; }

use Date::Calc qw( Compress );

# ======================================================================
#   $date = Compress($yy,$mm,$dd);
# ======================================================================

print "1..6\n";

$n = 1;
if (Compress(64,1,3)     == 48163) {print "ok $n\n";} else {print "not ok $n\n";}
$n++;
if (Compress(1964,1,3)   ==     0) {print "ok $n\n";} else {print "not ok $n\n";}
$n++;
if (Compress(95,11,18)   == 13170) {print "ok $n\n";} else {print "not ok $n\n";}
$n++;
if (Compress(1995,11,18) == 13170) {print "ok $n\n";} else {print "not ok $n\n";}
$n++;
if (Compress(1995,2,28)  == 12892) {print "ok $n\n";} else {print "not ok $n\n";}
$n++;
if (Compress(1995,2,29)  ==     0) {print "ok $n\n";} else {print "not ok $n\n";}

__END__