Description: make count.t failures on the last day of the month non-fatal
Author: Jakub Wilk <jwilk@debian.org>
Bug: https://bug.tasktools.org/browse/TW-1295
Bug-Debian: http://bugs.debian.org/743238
Forwarded: yes
Last-Update: 2014-04-01

--- a/test/count.t
+++ b/test/count.t
@@ -28,6 +28,7 @@
 
 use strict;
 use warnings;
+use POSIX qw(mktime);
 use Test::More tests => 7;
 
 # Ensure environment has no influence.
@@ -50,6 +51,13 @@
 qx{../src/task rc:count.rc 2 delete 2>&1};
 qx{../src/task rc:count.rc add four wait:eom 2>&1};
 
+TODO: {
+my @today = localtime;
+my @tomorrow = @today;
+$tomorrow[3] += 1;
+@tomorrow = localtime(mktime(@tomorrow));
+local $TODO = 'can fail when today == eom' if $today[4] != $tomorrow[4];
+
 # TODO This fails when today == eom.  For example, on 2013-04-30 at 8:00:00, the
 #      value for 'eom' is 2013-04-30 0:00:00, which is already past due, which
 #      means a second child task is generated.  This would be fixed by 'eom'
@@ -83,5 +91,7 @@
     ! -r 'backlog.data'   &&
     ! -r 'count.rc', 'Cleanup');
 
+}
+
 exit 0;
 
