| 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 $obj = new Date::Manip::TZ; |
| 10 | $obj->config("forcedate","now,America/New_York"); |
| 11 | |
| 12 | sub test { |
| 13 | my($abbrev,@zone)=@_; |
| 14 | $obj->define_abbrev("reset"); |
| 15 | $obj->define_abbrev($abbrev,@zone); |
| 16 | return $obj->zone($abbrev); |
| 17 | } |
| 18 | |
| 19 | my $tests=" |
| 20 | |
| 21 | EWT reset => |
| 22 | America/New_York |
| 23 | America/Detroit |
| 24 | America/Iqaluit |
| 25 | America/Toronto |
| 26 | |
| 27 | EWT |
| 28 | America/New_York |
| 29 | America/Iqaluit |
| 30 | America/Toronto |
| 31 | => |
| 32 | America/New_York |
| 33 | America/Iqaluit |
| 34 | America/Toronto |
| 35 | "; |
| 36 | |
| 37 | $::ti->tests(func => \&test, |
| 38 | tests => $tests); |
| 39 | $::ti->done_testing(); |
| 40 | |
| 41 | #Local Variables: |
| 42 | #mode: cperl |
| 43 | #indent-tabs-mode: nil |
| 44 | #cperl-indent-level: 3 |
| 45 | #cperl-continued-statement-offset: 2 |
| 46 | #cperl-continued-brace-offset: 0 |
| 47 | #cperl-brace-offset: 0 |
| 48 | #cperl-brace-imaginary-offset: 0 |
| 49 | #cperl-label-offset: 0 |
| 50 | #End: |