- Task was preventing removal of due date from any task that had a due date,
  which is wrong.  It should be any task with a recur: value and a due date
  (thanks to John Florian).
This commit is contained in:
Paul Beckingham 2010-02-05 18:34:12 -05:00
parent 73d6e05c0e
commit 5567b04277
3 changed files with 17 additions and 2 deletions

View file

@ -28,7 +28,7 @@
use strict;
use warnings;
use Test::More tests => 7;
use Test::More tests => 9;
# Create the rc file.
if (open my $fh, '>', 'bug.rc')
@ -53,6 +53,17 @@ unlike ($output, qr/You cannot remove the recurrence from a recurring task./ms,
$output = qx{../task rc:bug.rc 2 recur:};
like ($output, qr/You cannot remove the recurrence from a recurring task./ms, 'Recurrence removal error');
# Prevent removal of the due date from a recurring task.
$output = qx{../task rc:bug.rc 2 due:};
like ($output, qr/You cannot remove the due date from a recurring task./ms, 'Cannot remove due date from a recurring task');
# Allow removal of the due date from a non-recurring task.
qx{../task rc:bug.rc add nonrecurring};
$output = qx{../task rc:bug.rc ls};
my ($id) = $output =~ /(\d+)\s+nonrecurring/;
$output = qx{../task rc:bug.rc $id due:};
unlike ($output, qr/You cannot remove the due date from a recurring task./ms, 'Can remove due date from a non-recurring task');
# Cleanup.
unlink 'pending.data';
ok (!-r 'pending.data', 'Removed pending.data');