Skip to content

Commit

Permalink
adding release tests to try to parse a simple date in all timezones
Browse files Browse the repository at this point in the history
  • Loading branch information
barefootcoder committed Apr 17, 2016
1 parent 2de2469 commit e60ca32
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ Revision history for Date-Easy

[Distro Fixes]
* Incorrect issues link fixed
* Added author test for parsing dates in all timezones
(should provide better test coverage on release)
* Marked bogusly failing datetime test as TODO
(see also: https://github.com/muir/Time-modules/issues/8)

Expand Down
2 changes: 2 additions & 0 deletions dist.ini
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ copyright_holder = Buddy Burden
version = 0.01
[@BAREFOOT]

[ExtraTests]

[Prereqs]
Time::Piece = 1.30
Date::Parse = 1.17
Expand Down
18 changes: 18 additions & 0 deletions xt/release/timezones.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
use Test::Most 0.25;

use Date::Easy;


my $zoneinfo = "/usr/share/zoneinfo";
die("can't find timezone files to test with!") unless -d $zoneinfo;

foreach (`find $zoneinfo -type f`)
{
chomp;
s{^$zoneinfo/}{};
$ENV{TZ} = $_;
is date("04/95 00:22:12 PDT")->strftime('%Y-%m-%d'), '1995-04-01', "simple parse in timezone: $_";
}


done_testing;

0 comments on commit e60ca32

Please sign in to comment.