File: f003.t

package info (click to toggle)
libdate-calc-xs-perl 6.4-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, stretch
  • size: 800 kB
  • ctags: 166
  • sloc: perl: 7,397; ansic: 2,604; makefile: 2
file content (29 lines) | stat: -rw-r--r-- 848 bytes parent folder | download | duplicates (8)
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
#!perl -w

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

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__