| 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 | return ParseDateFormat(@_); |
| 11 | } |
| 12 | |
| 13 | Date_Init("ForceDate=2000-01-21-12:30:45,America/New_York"); |
| 14 | |
| 15 | my $tests =q{ |
| 16 | |
| 17 | %Y\\.%m\\-%d |
| 18 | 2000.12-13 |
| 19 | => |
| 20 | 2000121300:00:00 |
| 21 | |
| 22 | '.*?\\[%d/%b/%Y:%T %z\\].*' |
| 23 | '10.11.12.13 - - [17/Aug/2009:12:33:30 -0400] "GET /favicon.ico ..."' |
| 24 | => |
| 25 | 2009081712:33:30 |
| 26 | |
| 27 | %r |
| 28 | '12:01:02 AM' |
| 29 | => |
| 30 | 2000012100:01:02 |
| 31 | |
| 32 | }; |
| 33 | |
| 34 | $::ti->tests(func => \&test, |
| 35 | tests => $tests); |
| 36 | $::ti->done_testing(); |
| 37 | |
| 38 | #Local Variables: |
| 39 | #mode: cperl |
| 40 | #indent-tabs-mode: nil |
| 41 | #cperl-indent-level: 3 |
| 42 | #cperl-continued-statement-offset: 2 |
| 43 | #cperl-continued-brace-offset: 0 |
| 44 | #cperl-brace-offset: 0 |
| 45 | #cperl-brace-imaginary-offset: 0 |
| 46 | #cperl-label-offset: 0 |
| 47 | #End: |