| 1 |
#!/usr/bin/perl |
| 2 |
|
| 3 |
use warnings; |
| 4 |
use strict; |
| 5 |
use Test::Inter; |
| 6 |
$::ti = new Test::Inter $0; |
| 7 |
require "tests-dm5.pl"; |
| 8 |
|
| 9 |
Date_Init("TZ=EST"); |
| 10 |
|
| 11 |
my $tests=" |
| 12 |
|
| 13 |
'Wed Feb 7 1996 8:00' +1:1:1:1 '0 =>' 1996020809:01:01 |
| 14 |
|
| 15 |
'Wed Nov 20 1996 noon' +0:5:0:0 '0 =>' 1996112017:00:00 |
| 16 |
|
| 17 |
'Wed Nov 20 1996 noon' +0:13:0:0 '0 =>' 1996112101:00:00 |
| 18 |
|
| 19 |
'Wed Nov 20 1996 noon' +3:2:0:0 '0 =>' 1996112314:00:00 |
| 20 |
|
| 21 |
'Wed Nov 20 1996 noon' -3:2:0:0 '0 =>' 1996111710:00:00 |
| 22 |
|
| 23 |
'Wed Nov 20 1996 noon' +3:13:0:0 '0 =>' 1996112401:00:00 |
| 24 |
|
| 25 |
'Wed Nov 20 1996 noon' +6:2:0:0 '0 =>' 1996112614:00:00 |
| 26 |
|
| 27 |
'Dec 31 1996 noon' +1:2:0:0 '0 =>' 1997010114:00:00 |
| 28 |
|
| 29 |
'Jan 31 1997 23:59:59' '+ 1 sec' '0 =>' 1997020100:00:00 |
| 30 |
|
| 31 |
'20050215 13:59:11' -10h '0 =>' 2005021503:59:11 |
| 32 |
|
| 33 |
'20050215 13:59:11' -10h+0s '0 =>' 2005021503:59:11 |
| 34 |
|
| 35 |
"; |
| 36 |
|
| 37 |
$::ti->tests(func => \&DateCalc, |
| 38 |
tests => $tests); |
| 39 |
$::ti->done_testing(); |
| 40 |
|
| 41 |
|
| 42 |
#Local Variables: |
| 43 |
#mode: cperl |
| 44 |
#indent-tabs-mode: nil |
| 45 |
#cperl-indent-level: 3 |
| 46 |
#cperl-continued-statement-offset: 2 |
| 47 |
#cperl-continued-brace-offset: 0 |
| 48 |
#cperl-brace-offset: 0 |
| 49 |
#cperl-brace-imaginary-offset: 0 |
| 50 |
#cperl-label-offset: 0 |
| 51 |
#End: |