| 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 |
our $dmt = new Date::Manip::TZ; |
| 10 |
our $obj = $dmt->base(); |
| 11 |
$dmt->config("forcedate","now,America/New_York"); |
| 12 |
|
| 13 |
sub test { |
| 14 |
my(@test)=@_; |
| 15 |
my @ret = $obj->cmp(@test); |
| 16 |
return @ret; |
| 17 |
} |
| 18 |
|
| 19 |
my $tests=" |
| 20 |
|
| 21 |
[ 2007 01 15 10 00 00 ] [ 2007 01 15 12 00 00 ] => -1 |
| 22 |
|
| 23 |
[ 2007 01 15 12 00 00 ] [ 2007 01 15 10 00 00 ] => 1 |
| 24 |
|
| 25 |
[ 2007 01 15 12 00 00 ] [ 2007 01 15 12 00 00 ] => 0 |
| 26 |
|
| 27 |
"; |
| 28 |
|
| 29 |
$::ti->tests(func => \&test, |
| 30 |
tests => $tests); |
| 31 |
$::ti->done_testing(); |
| 32 |
|
| 33 |
#Local Variables: |
| 34 |
#mode: cperl |
| 35 |
#indent-tabs-mode: nil |
| 36 |
#cperl-indent-level: 3 |
| 37 |
#cperl-continued-statement-offset: 2 |
| 38 |
#cperl-continued-brace-offset: 0 |
| 39 |
#cperl-brace-offset: 0 |
| 40 |
#cperl-brace-imaginary-offset: 0 |
| 41 |
#cperl-label-offset: 0 |
| 42 |
#End: |