| 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 |
Date_Init("ForceDate=1997-03-08-12:30:00"); |
| 11 |
Date_Init("TodayIsMidnight=1","Internal=0"); |
| 12 |
|
| 13 |
my $tests=" |
| 14 |
|
| 15 |
today => 1997030800:00:00 |
| 16 |
|
| 17 |
now => 1997030812:30:00 |
| 18 |
|
| 19 |
'today at 4:00' => 1997030804:00:00 |
| 20 |
|
| 21 |
'now at 4:00' => 1997030804:00:00 |
| 22 |
|
| 23 |
'today week' => 1997031500:00:00 |
| 24 |
|
| 25 |
'now week' => 1997031512:30:00 |
| 26 |
|
| 27 |
'today week at 4:00' => 1997031504:00:00 |
| 28 |
|
| 29 |
'now week at 4:00' => 1997031504:00:00 |
| 30 |
|
| 31 |
"; |
| 32 |
|
| 33 |
$::ti->tests(func => \&ParseDate, |
| 34 |
tests => $tests); |
| 35 |
$::ti->done_testing(); |
| 36 |
|
| 37 |
#Local Variables: |
| 38 |
#mode: cperl |
| 39 |
#indent-tabs-mode: nil |
| 40 |
#cperl-indent-level: 3 |
| 41 |
#cperl-continued-statement-offset: 2 |
| 42 |
#cperl-continued-brace-offset: 0 |
| 43 |
#cperl-brace-offset: 0 |
| 44 |
#cperl-brace-imaginary-offset: 0 |
| 45 |
#cperl-label-offset: 0 |
| 46 |
#End: |