diff --git a/test/recur.until.t b/test/recur.until.t index 8ce467feb..7ab3d01f5 100755 --- a/test/recur.until.t +++ b/test/recur.until.t @@ -36,25 +36,36 @@ delete $ENV{'TASKRC'}; # Create the rc file. if (open my $fh, '>', 'recur.rc') { - print $fh "data.location=.\n"; + print $fh "data.location=.\n", + "bulk=10\n", + "dateformat=Y-M-DTH:N:S\n"; close $fh; } # Create a few recurring tasks, and test the sort order of the recur column. -qx{../src/task rc:recur.rc add foo due:now recur:2sec until:5sec 2>&1}; -diag ("Sleeping for 6 seconds"); -sleep 6; + +if (open my $fh, '>', 'pending.data') +{ + my $until = time () - 2; + my $entry = $until - 5; + + print $fh <&1}; like ($output, qr/^\s+2/ms, 'Found 2'); like ($output, qr/^\s+3/ms, 'Found 3'); like ($output, qr/^\s+4/ms, 'Found 4'); like ($output, qr/^\s+5/ms, 'Found 5'); -qx{../src/task rc:recur.rc 2 done 2>&1}; -qx{../src/task rc:recur.rc 3 done 2>&1}; -qx{../src/task rc:recur.rc 4 done 2>&1}; -qx{../src/task rc:recur.rc 5 done 2>&1}; -$output = qx{../src/task rc:recur.rc list 2>&1 >/dev/null}; +# There may be more than 4, but we don't care, because they must all now be +# removed. +qx{../src/task rc:recur.rc status:pending and /foo/ done 2>&1}; + +$output = qx{../src/task rc:recur.rc list 2>&1}; like ($output, qr/and was deleted/, 'Parent task deleted'); $output = qx{../src/task rc:recur.rc diag 2>&1}; diff --git a/test/timesheet.t b/test/timesheet.t index 38b61fa79..b254b34df 100755 --- a/test/timesheet.t +++ b/test/timesheet.t @@ -27,7 +27,7 @@ use strict; use warnings; -use Test::More tests => 4; +use Test::More tests => 3; # Ensure environment has no influence. delete $ENV{'TASKDATA'}; @@ -71,7 +71,6 @@ if (open my $fh, '>', 'pending.data') [uuid:"99999999-9999-9999-9999-999999999999 " status:"completed" description:"C2" entry:"$fourteen" end:"$fourteen"] EOF close $fh; - ok (-r 'pending.data', 'Created pending.data'); } my $output = qx{../src/task rc:time.rc timesheet 2>&1};