| 1 | #!/usr/bin/perl |
| 2 | |
| 3 | use warnings; |
| 4 | use strict; |
| 5 | use Test::Inter; |
| 6 | $::ti = new Test::Inter $0; |
| 7 | require "tests.pl"; |
| 8 | |
| 9 | sub test { |
| 10 | my($d1,$d2) = (@_); |
| 11 | DateCalc($d1,$d2); |
| 12 | } |
| 13 | |
| 14 | Date_Init("ForceDate=1997-03-08-12:30:00,America/New_York"); |
| 15 | Date_Init("ConfigFile=Manip.cnf"); |
| 16 | Date_Init("WorkDayBeg=08:30","WorkDayEnd=17:00"); |
| 17 | |
| 18 | my $tests=" |
| 19 | |
| 20 | 'Wed Nov 20 1996 noon' '+0:5:0:0 business' => 1996112108:30:00 |
| 21 | |
| 22 | 'Wed Nov 20 1996 noon' '+3:7:0:0 business' => 1996112610:30:00 |
| 23 | |
| 24 | 'Mar 31 1997 16:59:59' '+ 1 sec business' => 1997040108:30:00 |
| 25 | |
| 26 | "; |
| 27 | |
| 28 | $::ti->tests(func => \&test, |
| 29 | tests => $tests); |
| 30 | $::ti->done_testing(); |
| 31 | |
| 32 | #Local Variables: |
| 33 | #mode: cperl |
| 34 | #indent-tabs-mode: nil |
| 35 | #cperl-indent-level: 3 |
| 36 | #cperl-continued-statement-offset: 2 |
| 37 | #cperl-continued-brace-offset: 0 |
| 38 | #cperl-brace-offset: 0 |
| 39 | #cperl-brace-imaginary-offset: 0 |
| 40 | #cperl-label-offset: 0 |
| 41 | #End: |