File: f004.t

package info (click to toggle)
libdate-pcalc-perl 6.1-4
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, stretch
  • size: 1,856 kB
  • ctags: 619
  • sloc: perl: 16,706; ansic: 3,083; sh: 14; makefile: 4
file content (35 lines) | stat: -rw-r--r-- 962 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
32
33
34
35
#!perl -w

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

use Date::Pcalc qw( Uncompress );

# ======================================================================
#   ($cc,$yy,$mm,$dd) = Uncompress($date);
# ======================================================================

print "1..5\n";

$n = 1;
if ((($cc,$yy,$mm,$dd) = Uncompress(48163)) &&
($cc==2000)&&($yy==64)&&($mm==1)&&($dd==3))
{print "ok $n\n";} else {print "not ok $n\n";}
$n++;
unless (($cc,$yy,$mm,$dd) = Uncompress(0))
{print "ok $n\n";} else {print "not ok $n\n";}
$n++;
if ((($cc,$yy,$mm,$dd) = Uncompress(13170)) &&
($cc==1900)&&($yy==95)&&($mm==11)&&($dd==18))
{print "ok $n\n";} else {print "not ok $n\n";}
$n++;
if ((($cc,$yy,$mm,$dd) = Uncompress(12892)) &&
($cc==1900)&&($yy==95)&&($mm==2)&&($dd==28))
{print "ok $n\n";} else {print "not ok $n\n";}
$n++;
unless (($cc,$yy,$mm,$dd) = Uncompress(12893))
{print "ok $n\n";} else {print "not ok $n\n";}

__END__